[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
testsuite: do not fail on systems without read permissions.
From: |
Ralf Wildenhues |
Subject: |
testsuite: do not fail on systems without read permissions. |
Date: |
Tue, 14 Apr 2009 23:49:22 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
I'm pushing this patch to the next branch to fix some test failures on
(file) systems that do not allow to remove read permissions.
Cheers,
Ralf
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.
diff --git a/tests/instfail-info.test b/tests/instfail-info.test
index ba2b5b6..f2590f4 100755
--- a/tests/instfail-info.test
+++ b/tests/instfail-info.test
@@ -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
diff --git a/tests/instfail-java.test b/tests/instfail-java.test
index 44b5971..5df8a6d 100755
--- a/tests/instfail-java.test
+++ b/tests/instfail-java.test
@@ -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
diff --git a/tests/instfail-libtool.test b/tests/instfail-libtool.test
index 1b6bd2b..d7a78ae 100755
--- a/tests/instfail-libtool.test
+++ b/tests/instfail-libtool.test
@@ -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
-
:
diff --git a/tests/instfail.test b/tests/instfail.test
index a09ca17..8b928cc 100755
--- a/tests/instfail.test
+++ b/tests/instfail.test
@@ -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
diff --git a/tests/instmany-mans.test b/tests/instmany-mans.test
index 773fa76..c01d0da 100755
--- a/tests/instmany-mans.test
+++ b/tests/instmany-mans.test
@@ -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
diff --git a/tests/instmany-python.test b/tests/instmany-python.test
index 9f65237..1d0b91b 100755
--- a/tests/instmany-python.test
+++ b/tests/instmany-python.test
@@ -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
diff --git a/tests/instmany.test b/tests/instmany.test
index 31176d7..a1409dc 100755
--- a/tests/instmany.test
+++ b/tests/instmany.test
@@ -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
diff --git a/tests/parallel-tests9.test b/tests/parallel-tests9.test
index 6678920..e1f088b 100755
--- a/tests/parallel-tests9.test
+++ b/tests/parallel-tests9.test
@@ -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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- testsuite: do not fail on systems without read permissions.,
Ralf Wildenhues <=