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:
Juli Mallett 2002-06-24 13:51:30 +00:00
parent 401717b20d
commit d54336bd0d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98752

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)