diff --git a/tools/regression/usr.bin/m4/Makefile b/tools/regression/usr.bin/m4/Makefile index b937d41a4e4a..99036706a818 100644 --- a/tools/regression/usr.bin/m4/Makefile +++ b/tools/regression/usr.bin/m4/Makefile @@ -1,4 +1,4 @@ # $FreeBSD$ all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} + @sh ${.CURDIR}/regress.sh ${.CURDIR} diff --git a/tools/regression/usr.bin/m4/regress.sh b/tools/regression/usr.bin/m4/regress.sh index 84f4fb5e9edb..b73d41093fcb 100644 --- a/tools/regression/usr.bin/m4/regress.sh +++ b/tools/regression/usr.bin/m4/regress.sh @@ -1,6 +1,13 @@ # $FreeBSD$ -REGRESSION_START($1) +# Go into the regression test directory, handed to us by make(1) +TESTDIR=$1 +if [ -z "$TESTDIR" ]; then + TESTDIR=. +fi +cd $TESTDIR + +STATUS=0 for test in GNU/changecom changecom; do echo "Running test $test" @@ -28,4 +35,6 @@ for test in GNU/changecom changecom; do fi done +exit $STATUS + REGRESSION_END()