]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: fix few bugs in self checks
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 16 Apr 2011 12:32:29 +0000 (14:32 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 16 Apr 2011 12:32:29 +0000 (14:32 +0200)
Related to automake bug#8508.

* tests/self-check-cleanup.test: Be laxer when grepping output
from `ls -l', to account for ACLs and SELinux-only files.
* tests/self-check-dir.test: Source `defs-static' to read in the
correct definition for $SHELL.
* tests/self-check-me.test: Likewise, and extend a bit.

Report from Jim Meyering.

ChangeLog
tests/self-check-cleanup.test
tests/self-check-dir.test
tests/self-check-me.test

index 5ef0c0d87040c27661bf23f52c25edefdb69a731..78236316bccccda3230521c762be28b93f7c5c4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-04-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests: fix few bugs in self checks
+       Related to automake bug#8508.
+       * tests/self-check-cleanup.test: Be laxer when grepping output
+       from `ls -l', to account for ACLs and SELinux-only files.
+       * tests/self-check-dir.test: Source `defs-static' to read in the
+       correct definition for $SHELL.
+       * tests/self-check-me.test: Likewise, and extend a bit.
+       Report from Jim Meyering.
+
 2011-02-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: add testcases sanity-checking the testsuite
index 92a203e989efd1f878295be71527602b62a0bc81..390d9b520000a0e3276c8185c981339d61b7dc21 100755 (executable)
@@ -87,8 +87,8 @@ if $have_symlinks; then
   cd ..
   $SHELL -c '. ./defs' dummy.test
   ls -l # For debugging.
-  ls -l file | grep "^---------- .*file"
-  ls -ld dir | grep "^d--------- .*dir"
+  ls -l file | grep "^----------.*file"
+  ls -ld dir | grep "^d---------.*dir"
 
   $SHELL -c '
     ocwd=`pwd` || exit 1
@@ -96,8 +96,8 @@ if $have_symlinks; then
     ln -s "$ocwd/dir" "$ocwd/file" .
   ' dummy.test
   ls -l # For debugging.
-  ls -l file | grep "^---------- .*file"
-  ls -ld dir | grep "^d--------- .*dir"
+  ls -l file | grep "^----------.*file"
+  ls -ld dir | grep "^d---------.*dir"
 
   rmdir dir
   rm -f file
index a8e5d889a243690134db00deca3fe395a0157067..ba9fd292df0263cc67fe3d1ec85e4a58fccd6ffe 100755 (executable)
@@ -18,6 +18,8 @@
 # Check that tests using `./defs' create a proper temporary directory,
 # and run in it.
 
+. ./defs-static || exit 1
+
 set -ex
 
 this=S_dir
index 5773e2c2a90be25cfd1ca7d62ae4d76e496fad57..141857fdc5eaa1e7bcc209d10bf988ae807790ca 100755 (executable)
 # Sanity check for the automake testsuite.
 # Make sure that $me gets automatically defined by `./defs'.
 
-set -ex
+. ./defs-static || exit 1
 
-: ${SHELL=/bin/sh}
+set -ex
 
 $SHELL -c '. ./defs && echo me=$me' foo-bar-.test | grep '^me=foo-bar-$'
 $SHELL -c '. ./defs && echo me=$me' _foo__bar.test | grep '^me=_foo__bar$'
 $SHELL -c '. ./defs && echo me=$me' 012.test | grep '^me=012$'
 $SHELL -c '. ./defs && echo me=$me' foo.bar | grep '^me=foo\.bar$'
+$SHELL -c '. ./defs && echo me=$me' a.b.c.test | grep '^me=a\.b\.c$'
 
 :