]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
testsuite: do not fail on systems without read permissions.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 14 Apr 2009 21:42:14 +0000 (23:42 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 14 Apr 2009 21:42:14 +0000 (23:42 +0200)
* tests/instfail-info.test: Do not use the `non-root'
requirement for testing whether files may be made unreadable;
instead use `test -r' and skip the test if that still works.
* tests/instfail-java.test: Likewise.
* tests/instfail-libtool.test: Likewise.
* tests/instfail.test: Likewise.
* tests/instmany-mans.test: Likewise.
* tests/instmany-python.test: Likewise.
* tests/instmany.test: Likewise.
* tests/parallel-tests9.test: Likewise.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/instfail-info.test
tests/instfail-java.test
tests/instfail-libtool.test
tests/instfail.test
tests/instmany-mans.test
tests/instmany-python.test
tests/instmany.test
tests/parallel-tests9.test

index 047a03276b5d3e7ed2c32a82f3796920f8a0ebab..8dae4dba4e9b4c3e8915b5b71ce2ce03410d8389 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2009-04-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       testsuite: do not fail on systems without read permissions.
+       * tests/instfail-info.test: Do not use the `non-root'
+       requirement for testing whether files may be made unreadable;
+       instead use `test -r' and skip the test if that still works.
+       * tests/instfail-java.test: Likewise.
+       * tests/instfail-libtool.test: Likewise.
+       * tests/instfail.test: Likewise.
+       * tests/instmany-mans.test: Likewise.
+       * tests/instmany-python.test: Likewise.
+       * tests/instmany.test: Likewise.
+       * tests/parallel-tests9.test: Likewise.
+
        testsuite: parallel make fixes.
        This patch fixes a couple of testsuite bugs exposed with
        `MAKE=make\ -jN make check'.
index ba2b5b60a29805dd53464f08716976d6410b2c06..f2590f485b16b00ac0f8bdb2b19959a22a49bfc7 100755 (executable)
@@ -19,9 +19,7 @@
 
 # This test has a few sister tests, for java, info, libtool.
 
-
-# non-root should catch 'chmod a-r'-challenged file systems.
-required='non-root makeinfo'
+required='makeinfo'
 . ./defs || Exit 1
 
 set -e
@@ -59,6 +57,7 @@ $MAKE uninstall
 for file in info1.info
 do
   chmod a-r $file
+  test ! -r $file || Exit 77
   $MAKE install-data && Exit 1
   chmod u+r $file
 done
index 44b5971b414f46db8472b718537be57468679563..5df8a6d4fa3c065a751d94ac4fb4d72063bcddb1 100755 (executable)
@@ -19,9 +19,6 @@
 
 # This is the java sister test of instfail.test.
 
-
-# non-root should catch 'chmod a-r'-challenged file systems.
-required='non-root'
 . ./defs || Exit 1
 
 set -e
@@ -59,6 +56,7 @@ $MAKE uninstall
 for file in java1.class
 do
   chmod a-r $file
+  test ! -r $file || Exit 77
   $MAKE install-data && Exit 1
   chmod u+r $file
 done
index 1b6bd2b8f18b31e0db2ab46f49b602395c8277cb..d7a78ae9acf114401265a0ca2fe59eab1a4d1c8b 100755 (executable)
@@ -19,9 +19,7 @@
 
 # This is the libtool sister test of instfail.test
 
-
-# non-root should catch 'chmod a-r'-challenged file systems.
-required='non-root libtool libtoolize'
+required='libtool libtoolize'
 . ./defs || Exit 1
 
 set -e
@@ -65,6 +63,14 @@ $MAKE
 $MAKE install
 $MAKE uninstall
 
+for file in liblt1.la libltn1.la
+do
+  chmod a-r $file
+  test ! -r $file || Exit 77
+  $MAKE install-exec && Exit 1
+  chmod u+r $file
+done
+
 $MAKE unreadable-prog
 $MAKE install-exec && Exit 1
 $MAKE readable-prog
@@ -73,11 +79,4 @@ $MAKE unreadable-progn
 $MAKE install-exec && Exit 1
 $MAKE readable-progn
 
-for file in liblt1.la libltn1.la
-do
-  chmod a-r $file
-  $MAKE install-exec && Exit 1
-  chmod u+r $file
-done
-
 :
index a09ca1759646a79b4453928654ddc79b8f09e3df..8b928cc27f96b2f8635b02f93a9a35f3c9308a12 100755 (executable)
@@ -19,9 +19,6 @@
 
 # This test has a few sister tests, for java, info, libtool.
 
-
-# non-root should catch 'chmod a-r'-challenged file systems.
-required=non-root
 . ./defs || Exit 1
 
 set -e
@@ -70,6 +67,14 @@ $MAKE
 $MAKE install
 $MAKE uninstall
 
+for file in lib1.a libn1.a
+do
+  chmod a-r $file
+  test ! -r $file || Exit 77
+  $MAKE install-exec && Exit 1
+  chmod u+r $file
+done
+
 $MAKE unreadable-prog
 $MAKE install-exec && Exit 1
 $MAKE readable-prog
@@ -78,13 +83,6 @@ $MAKE unreadable-progn
 $MAKE install-exec && Exit 1
 $MAKE readable-progn
 
-for file in lib1.a libn1.a
-do
-  chmod a-r $file
-  $MAKE install-exec && Exit 1
-  chmod u+r $file
-done
-
 if grep "^EMACS = no" Makefile; then :; else
   for file in lisp1.el lisp1.elc
   do
index 773fa76ceaa0fae85b964184b5416cb55354cd89..c01d0dac2f0281298044b47b64e9a009068dded2 100755 (executable)
@@ -18,7 +18,6 @@
 
 # This is the mans sister test of instmany.test, see there for details.
 
-required=non-root    # hope to catch 'chmod a-r'-challenged file systems.
 . ./defs || Exit 1
 
 set -e
@@ -137,6 +136,7 @@ srcdir=../../$subdir
 
 for file in page3.1 page$nfiles.1 npage3.1 npage$nfiles.1; do
   chmod a-r $srcdir/$file
+  test ! -r $srcdir/$file || Exit 77
   $MAKE install-man1 && Exit 1
   chmod u+r $srcdir/$file
 done
index 9f652379cd5c5f9247bd9a514d24481307373db0..1d0b91b4baadaa4dfacb2e988c82901f79b91987 100755 (executable)
@@ -18,7 +18,7 @@
 
 # This is the python sister test of instmany.test, see there for details.
 
-required='non-root python'
+required='python'
 . ./defs || Exit 1
 
 set -e
@@ -123,6 +123,7 @@ srcdir=../../$subdir
 for file in python3.py python$nfiles.py
 do
   chmod a-r $srcdir/$file
+  test ! -r $srcdir/$file || Exit 77
   $MAKE install && Exit 1
   chmod u+r $srcdir/$file
 done
index 31176d727fe07d7d403fa2ef227d70f78f1b4ec8..a1409dc7b9c967a39bae27f326a5e884740d1268 100755 (executable)
@@ -26,8 +26,6 @@
 # For texinfos, we expand names using $(srcdir) in the first place.
 # Let's hope nobody uses many texinfos.
 
-
-required=non-root    # hope to catch 'chmod a-r'-challenged file systems.
 . ./defs || Exit 1
 
 set -e
@@ -153,6 +151,7 @@ srcdir=../../$subdir
 for file in script3 script$nfiles
 do
   chmod a-r $srcdir/$file
+  test ! -r $srcdir/$file || Exit 77
   $MAKE install-binSCRIPTS && Exit 1
   chmod u+r $srcdir/$file
 done
index 6678920e11728065d68280b253aca20732cf5447..e1f088bdabb218602f8d5447181cec78a5f94fb3 100755 (executable)
@@ -68,9 +68,11 @@ grep baz.test stdout || Exit 1
 
 # If we cannot read the log file, then redo it as well.
 chmod a-r foo.log
-$MAKE recheck >stdout && { cat stdout; Exit 1; }
-cat stdout
-grep foo.test stdout || Exit 1
+if test ! -r foo.log; then
+   $MAKE recheck >stdout && { cat stdout; Exit 1; }
+   cat stdout
+   grep foo.test stdout || Exit 1
+fi
 
 # Ensure that recheck builds check_SCRIPTS, and that
 # recheck reruns nothing if check has not been run.