regress.sh revision 137587
197991Sjmallett# $FreeBSD: head/tools/regression/usr.bin/m4/regress.sh 137587 2004-11-11 19:47:55Z nik $ 297991Sjmallett 398760Sjmallett# Go into the regression test directory, handed to us by make(1) 498760SjmallettTESTDIR=$1 598760Sjmallettif [ -z "$TESTDIR" ]; then 698760Sjmallett TESTDIR=. 798760Sjmallettfi 898760Sjmallettcd $TESTDIR 997991Sjmallett 1098760SjmallettSTATUS=0 1198760Sjmallett 12137587Snikecho 1..2 13137587Snik 1497991Sjmallettfor test in GNU/changecom changecom; do 1597991Sjmallett case "$test" in 1697991Sjmallett GNU/*) 1797991Sjmallett M4="m4 -g" 1897991Sjmallett GNU="g" 1997991Sjmallett test=`basename $test` 2097991Sjmallett ;; 2197991Sjmallett *) 2297991Sjmallett M4="m4" 2397991Sjmallett GNU="" 2497991Sjmallett ;; 2597991Sjmallett esac 2697991Sjmallett case "$test" in 2797991Sjmallett changecom) 2897991Sjmallett $M4 < regress.$test.in | diff -u regress.$GNU$test.out - 2997991Sjmallett ;; 3097991Sjmallett esac 3197991Sjmallett if [ $? -eq 0 ]; then 32137587Snik echo "ok - $test # Test detected no regression, output matches." 3397991Sjmallett else 3497991Sjmallett STATUS=$? 35137587Snik echo "not ok - $test # Test failed: regression detected. See above." 3697991Sjmallett fi 3797991Sjmallettdone 3897991Sjmallett 3998760Sjmallettexit $STATUS 4098760Sjmallett 4198759SjmallettREGRESSION_END() 42