3e959a33f9
understood by Perl's Test::Harness module and prove(1) commands. Update README to describe the new protocol. The work's broken down into two main sets of changes. First, update the existing test programs (shell scripts and C programs) to produce output in the ok/not ok format, and to, where possible, also produce a header describing the number of tests that are expected to be run. Second, provide the .t files that actually run the tests. In some cases these are copies of, or very similar too, scripts that already existed. I've kept the old scripts around so that it's possible to verify that behaviour under this new system (in terms of whether or not a test fails) is identical to the behaviour under the old system. Add a TODO file.
42 lines
670 B
Bash
42 lines
670 B
Bash
# $FreeBSD$
|
|
|
|
# Go into the regression test directory, handed to us by make(1)
|
|
TESTDIR=$1
|
|
if [ -z "$TESTDIR" ]; then
|
|
TESTDIR=.
|
|
fi
|
|
cd $TESTDIR
|
|
|
|
STATUS=0
|
|
|
|
echo 1..2
|
|
|
|
for test in GNU/changecom changecom; do
|
|
case "$test" in
|
|
GNU/*)
|
|
M4="m4 -g"
|
|
GNU="g"
|
|
test=`basename $test`
|
|
;;
|
|
*)
|
|
M4="m4"
|
|
GNU=""
|
|
;;
|
|
esac
|
|
case "$test" in
|
|
changecom)
|
|
$M4 < regress.$test.in | diff -u regress.$GNU$test.out -
|
|
;;
|
|
esac
|
|
if [ $? -eq 0 ]; then
|
|
echo "ok - $test # Test detected no regression, output matches."
|
|
else
|
|
STATUS=$?
|
|
echo "not ok - $test # Test failed: regression detected. See above."
|
|
fi
|
|
done
|
|
|
|
exit $STATUS
|
|
|
|
REGRESSION_END()
|