Only exit at the end of a test, exit with the last value of $? that was not 0.
This way the entire regression test is looked at as a pass/fail, not just one sub-test.
This commit is contained in:
parent
9daa5b147a
commit
533e28dbe1
@ -7,13 +7,17 @@ if [ -z "$TESTDIR" ]; then
|
||||
fi
|
||||
cd $TESTDIR
|
||||
|
||||
STATUS=0
|
||||
|
||||
for test in traditional base64; do
|
||||
echo "Running test $test"
|
||||
uudecode -p < regress.$test.in | cmp regress.out -
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Test $test detected no regression, output matches."
|
||||
else
|
||||
STATUS=$?
|
||||
echo "Test $test failed: regression detected. See above."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $STATUS
|
||||
|
@ -7,6 +7,8 @@ if [ -z "$TESTDIR" ]; then
|
||||
fi
|
||||
cd $TESTDIR
|
||||
|
||||
STATUS=0
|
||||
|
||||
# Note that currently the uuencode(1) program provides no facility to
|
||||
# include the file mode explicitly based on an argument passed to it,
|
||||
# so the regress.in file must be mode 644, or the test will say that,
|
||||
@ -25,7 +27,9 @@ for test in traditional base64; do
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Test $test detected no regression, output matches."
|
||||
else
|
||||
STATUS=$?
|
||||
echo "Test $test failed: regression detected. See above."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $STATUS
|
||||
|
@ -7,6 +7,8 @@ if [ -z "$TESTDIR" ]; then
|
||||
fi
|
||||
cd $TESTDIR
|
||||
|
||||
STATUS=0
|
||||
|
||||
for test in normal I J L; do
|
||||
echo "Running test $test"
|
||||
case "$test" in
|
||||
@ -26,7 +28,9 @@ for test in normal I J L; do
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Test $test detected no regression, output matches."
|
||||
else
|
||||
STATUS=$?
|
||||
echo "Test $test failed: regression detected. See above."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $STATUS
|
||||
|
Loading…
x
Reference in New Issue
Block a user