[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: workaround for shells with broken 'set -e'
From: |
Stefano Lattarini |
Subject: |
[PATCH] tests: workaround for shells with broken 'set -e' |
Date: |
Sun, 12 Feb 2012 17:20:35 +0100 |
And yet another couple of spurious failures are fixed here.
-*-*-
>From 682d5ce5382ab50d63eaf9fe373a1370bb435b6f Mon Sep 17 00:00:00 2001
Message-Id: <address@hidden>
From: Stefano Lattarini <address@hidden>
Date: Sun, 12 Feb 2012 17:16:54 +0100
Subject: [PATCH] tests: workaround for shells with broken 'set -e'
* 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 | 5 ++---
tests/yacc-cxx.test | 1 +
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/check12.test b/tests/check12.test
index 88235f8..92e4a69 100755
--- a/tests/check12.test
+++ b/tests/check12.test
@@ -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
diff --git a/tests/yacc-cxx.test b/tests/yacc-cxx.test
index a805087..430fe06 100755
--- a/tests/yacc-cxx.test
+++ b/tests/yacc-cxx.test
@@ -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.
--
1.7.7.3
Re: Merging 'yacc-work' into master, Peter Rosin, 2012/02/13