Add a simple (to be expanded) library of functions for the regression tests,

to handle the ones which output to stdout and have output in regress.$test.out,
etc.  More freeform macros should and will be written, but these are the most
prominent and most straightforward sort of tests we have around, so it makes
sense to try to accomodate them.
This commit is contained in:
jmallett 2002-06-24 13:51:30 +00:00
parent 0f0f563b6e
commit 0317135e4d

View File

@ -0,0 +1,23 @@
# $FreeBSD$
define(`REGRESSION_START',
TESTDIR=$1
if [ -z "$TESTDIR" ]; then
TESTDIR=.
fi
cd $TESTDIR
STATUS=0)
define(`REGRESSION_TEST',
echo "Running test $1"
$2 | diff -u regress.$1.out -
if [ $? -eq 0 ]; then
echo "PASS: Test $1 detected no regression."
else
STATUS=$?
echo "FAIL: Test $1 failed: regression detected. See above."
fi)
define(`REGRESSION_END',
exit $STATUS)