]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: workaround for shells with broken 'set -e'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 12 Feb 2012 16:16:54 +0000 (17:16 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 12 Feb 2012 16:16:54 +0000 (17:16 +0100)
* tests/yacc-cxx.test: Some versions of the BSD shell wrongly bail
out when the 'errexit' shell flag is active if the left-hand
command in a "&&" list fails and such list is the *last* command
of a "for" or "while" loop or of an "if" construct.  Work around
this issue.
* tests/check12.test: Likewise.

tests/check12.test
tests/yacc-cxx.test

index 88235f8cbef070c6470acf75cb3913677924f1f8..92e4a696d04ab1d0ea0d6d86c37f12105c25a7b7 100755 (executable)
@@ -140,9 +140,7 @@ for vpath in : false; do
     test -f test-suite.log
     test -f a.log
     test -f b.log
-  else
-    :
-  fi
+  else :; fi
   grep 'check-local succeeded :-)' local.log
 
   cp -f config.status config-status.sav
@@ -179,6 +177,7 @@ for vpath in : false; do
     grep '^FAIL: b$' test-suite.log
     grep '^b\.test: exit status: 1$' test-suite.log
     grep '^a\.test' test-suite.log && Exit 1
+    : For shells with busted 'set -e'.
   else :; fi
 
   CHECKLOCAL_EXIT_STATUS=1 $MAKE check && Exit 1
index a805087f19424702848b9efc6867f3d9f39db379..430fe06c8928db569c70a0bc7d9e3633fc9e42c5 100755 (executable)
@@ -93,6 +93,7 @@ test -f foo4-parse4.output
 for i in 1 2 3 4; do
   echo a | ./foo$i
   echo b | ./foo$i && Exit 1
+  : For shells with busted 'set -e'.
 done
 
 # The Yacc-derived C++ sources must be shipped.