Prefix tests with PASS and FAIL, to make grepping easier, and note this in

the README.

This affects only the base-system regression tests, of course.
This commit is contained in:
Juli Mallett 2002-04-27 02:26:23 +00:00
parent fe3cb0e1ec
commit 624abf8519
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=95538
10 changed files with 25 additions and 20 deletions

View File

@ -13,10 +13,10 @@ all:
@echo "Running test variables"
@echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \
diff -u ${.CURDIR}/regress.variables.out - || ${MAKE} failure
@echo "Test variables detected no regression, output matches."
@echo "PASS: Test variables detected no regression, output matches."
@echo "Running test targets"
@${MAKE} double || ${MAKE} failure
@echo "Test targets detected no regression."
@echo "PASS: Test targets detected no regression."
# Doubly-defined targets. NetBSD make(1) will warn, ours will silently use the
# ``right'' one.
@ -27,5 +27,5 @@ double:
@false
failure:
@echo "Test failed: regression detected. See above."
@echo "FAIL: Test failed: regression detected. See above."
@false

View File

@ -10,6 +10,11 @@ which is the same as their path relative to src/, for example the uuencode(1)
utility resides in src/usr.bin/uuencode so its regression test resides in
src/tools/regression/usr.bin/uuencode.
Base system regression tests should prefix their test results with 'PASS' or
'FAIL' accordingly, to make checking for failed tests easier. For now the
tests are very free-form, and it's up to you to do that. Eventually, it
should be a part of the regression test framework.
Please make a subdir per other regression test, and add a brief description to
this file.

View File

@ -9,8 +9,8 @@ cd $TESTDIR
file2c 'const char data[] = {' ', 0};' < regress.in | diff -u regress.out -
if [ $? -eq 0 ]; then
echo "Test detected no regression, output matches."
echo "PASS: Test detected no regression, output matches."
else
echo "Test failed: regression detected. See above."
echo "FAIL: Test failed: regression detected. See above."
exit 1
fi

View File

@ -10,8 +10,8 @@ cd $TESTDIR
join -t , -a1 -a2 -e '(unknown)' -o 0,1.2,2.2 regress.1.in regress.2.in | \
diff -u regress.out -
if [ $? -eq 0 ]; then
echo "Test detected no regression, output matches."
echo "PASS: Test detected no regression, output matches."
else
echo "Test failed: regression detected. See above."
echo "FAIL: Test failed: regression detected. See above."
exit 1
fi

View File

@ -9,8 +9,8 @@ cd $TESTDIR
jot -w '%X' -s ',' 100 1 200 | diff -u regress.out -
if [ $? -eq 0 ]; then
echo "Test detected no regression, output matches."
echo "PASS: Test detected no regression, output matches."
else
echo "Test failed: regression detected. See above."
echo "FAIL: Test failed: regression detected. See above."
exit 1
fi

View File

@ -13,10 +13,10 @@ all:
@echo "Running test variables"
@echo 1:${DATA1} 2:${DATA2} 3:${DATA3} 4:${DATA4} 5:${DATA5} | \
diff -u ${.CURDIR}/regress.variables.out - || ${MAKE} failure
@echo "Test variables detected no regression, output matches."
@echo "PASS: Test variables detected no regression, output matches."
@echo "Running test targets"
@${MAKE} double || ${MAKE} failure
@echo "Test targets detected no regression."
@echo "PASS: Test targets detected no regression."
# Doubly-defined targets. NetBSD make(1) will warn, ours will silently use the
# ``right'' one.
@ -27,5 +27,5 @@ double:
@false
failure:
@echo "Test failed: regression detected. See above."
@echo "FAIL: Test failed: regression detected. See above."
@false

View File

@ -23,10 +23,10 @@ for test in G P psl; do
;;
esac
if [ $? -eq 0 ]; then
echo "Test $test detected no regression, output matches."
echo "PASS: Test $test detected no regression, output matches."
else
STATUS=$?
echo "Test $test failed: regression detected. See above."
echo "FAIL: Test $test failed: regression detected. See above."
fi
done

View File

@ -13,10 +13,10 @@ 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."
echo "PASS: Test $test detected no regression, output matches."
else
STATUS=$?
echo "Test $test failed: regression detected. See above."
echo "FAIL: Test $test failed: regression detected. See above."
fi
done

View File

@ -25,10 +25,10 @@ for test in traditional base64; do
;;
esac
if [ $? -eq 0 ]; then
echo "Test $test detected no regression, output matches."
echo "PASS: Test $test detected no regression, output matches."
else
STATUS=$?
echo "Test $test failed: regression detected. See above."
echo "FAIL: Test $test failed: regression detected. See above."
fi
done

View File

@ -26,10 +26,10 @@ for test in normal I J L; do
;;
esac
if [ $? -eq 0 ]; then
echo "Test $test detected no regression, output matches."
echo "PASS: Test $test detected no regression, output matches."
else
STATUS=$?
echo "Test $test failed: regression detected. See above."
echo "FAIL: Test $test failed: regression detected. See above."
fi
done