diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-04-27 02:26:23 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-04-27 02:26:23 +0000 |
commit | 300c1a11c0a8aea8ec82abdbef0f195a2091929b (patch) | |
tree | 72ee927892dcfa6e262a7f73e36ca21b46008779 /tools | |
parent | cab9acb79f15bb61027a5f66c3ab61888bbe2662 (diff) | |
download | FreeBSD-src-300c1a11c0a8aea8ec82abdbef0f195a2091929b.zip FreeBSD-src-300c1a11c0a8aea8ec82abdbef0f195a2091929b.tar.gz |
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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/build/make_check/Makefile | 6 | ||||
-rw-r--r-- | tools/regression/README | 5 | ||||
-rw-r--r-- | tools/regression/usr.bin/file2c/regress.sh | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/join/regress.sh | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/jot/regress.sh | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/make/Makefile | 6 | ||||
-rw-r--r-- | tools/regression/usr.bin/sed/regress.sh | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/uudecode/regress.sh | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/uuencode/regress.sh | 4 | ||||
-rw-r--r-- | tools/regression/usr.bin/xargs/regress.sh | 4 |
10 files changed, 25 insertions, 20 deletions
diff --git a/tools/build/make_check/Makefile b/tools/build/make_check/Makefile index 9b65f90..2176dae 100644 --- a/tools/build/make_check/Makefile +++ b/tools/build/make_check/Makefile @@ -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 diff --git a/tools/regression/README b/tools/regression/README index bb2a279..895b620 100644 --- a/tools/regression/README +++ b/tools/regression/README @@ -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. diff --git a/tools/regression/usr.bin/file2c/regress.sh b/tools/regression/usr.bin/file2c/regress.sh index 7f4c271..b716788 100644 --- a/tools/regression/usr.bin/file2c/regress.sh +++ b/tools/regression/usr.bin/file2c/regress.sh @@ -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 diff --git a/tools/regression/usr.bin/join/regress.sh b/tools/regression/usr.bin/join/regress.sh index 5e9eea4..2c2e9a7 100644 --- a/tools/regression/usr.bin/join/regress.sh +++ b/tools/regression/usr.bin/join/regress.sh @@ -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 diff --git a/tools/regression/usr.bin/jot/regress.sh b/tools/regression/usr.bin/jot/regress.sh index f013e82..91b39a8 100644 --- a/tools/regression/usr.bin/jot/regress.sh +++ b/tools/regression/usr.bin/jot/regress.sh @@ -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 diff --git a/tools/regression/usr.bin/make/Makefile b/tools/regression/usr.bin/make/Makefile index 9b65f90..2176dae 100644 --- a/tools/regression/usr.bin/make/Makefile +++ b/tools/regression/usr.bin/make/Makefile @@ -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 diff --git a/tools/regression/usr.bin/sed/regress.sh b/tools/regression/usr.bin/sed/regress.sh index 9198b3f..d7a773c 100644 --- a/tools/regression/usr.bin/sed/regress.sh +++ b/tools/regression/usr.bin/sed/regress.sh @@ -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 diff --git a/tools/regression/usr.bin/uudecode/regress.sh b/tools/regression/usr.bin/uudecode/regress.sh index eb8874f..a12066d 100644 --- a/tools/regression/usr.bin/uudecode/regress.sh +++ b/tools/regression/usr.bin/uudecode/regress.sh @@ -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 diff --git a/tools/regression/usr.bin/uuencode/regress.sh b/tools/regression/usr.bin/uuencode/regress.sh index cce4138..97a5986 100644 --- a/tools/regression/usr.bin/uuencode/regress.sh +++ b/tools/regression/usr.bin/uuencode/regress.sh @@ -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 diff --git a/tools/regression/usr.bin/xargs/regress.sh b/tools/regression/usr.bin/xargs/regress.sh index cfc6992..836b10e 100644 --- a/tools/regression/usr.bin/xargs/regress.sh +++ b/tools/regression/usr.bin/xargs/regress.sh @@ -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 |