aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuli Mallett <jmallett@FreeBSD.org>2002-04-21 00:18:29 +0000
committerJuli Mallett <jmallett@FreeBSD.org>2002-04-21 00:18:29 +0000
commit533e28dbe13b86987e6195bd29ebe9e7c2212dfe (patch)
treed0fcfff8b659df1483a0223f280ceb24dce84d45 /tools
parent9daa5b147a18a617dfc2e5cb67a25746b320cea8 (diff)
downloadsrc-533e28dbe13b86987e6195bd29ebe9e7c2212dfe.tar.gz
src-533e28dbe13b86987e6195bd29ebe9e7c2212dfe.zip
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.
Notes
Notes: svn path=/head/; revision=95166
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/usr.bin/uudecode/regress.sh6
-rw-r--r--tools/regression/usr.bin/uuencode/regress.sh6
-rw-r--r--tools/regression/usr.bin/xargs/regress.sh6
3 files changed, 15 insertions, 3 deletions
diff --git a/tools/regression/usr.bin/uudecode/regress.sh b/tools/regression/usr.bin/uudecode/regress.sh
index 36e224a9d185..eb8874f1d2db 100644
--- a/tools/regression/usr.bin/uudecode/regress.sh
+++ b/tools/regression/usr.bin/uudecode/regress.sh
@@ -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
diff --git a/tools/regression/usr.bin/uuencode/regress.sh b/tools/regression/usr.bin/uuencode/regress.sh
index e0afdabe7a81..cce41386ed2e 100644
--- a/tools/regression/usr.bin/uuencode/regress.sh
+++ b/tools/regression/usr.bin/uuencode/regress.sh
@@ -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
diff --git a/tools/regression/usr.bin/xargs/regress.sh b/tools/regression/usr.bin/xargs/regress.sh
index fa8b7ee5bc12..cfc6992a68b3 100644
--- a/tools/regression/usr.bin/xargs/regress.sh
+++ b/tools/regression/usr.bin/xargs/regress.sh
@@ -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