diff options
Diffstat (limited to 'tests/reqd4/test.mk')
-rw-r--r-- | tests/reqd4/test.mk | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/reqd4/test.mk b/tests/reqd4/test.mk new file mode 100644 index 0000000..bfcfb07 --- /dev/null +++ b/tests/reqd4/test.mk @@ -0,0 +1,18 @@ +CLEANFILES += ${.OBJDIR}/${.CURDIR:T}.test.out + +test: + @echo 'Testing ${.CURDIR}... ' 1>&2; \ + set -e; cd ${.CURDIR}; \ + tmp_out=${.OBJDIR}/${.CURDIR:T}.test.out; \ + { \ + ${MAKE} ${MAKEFLAGS} -j3 all 2>&1 | sed -n 2p; \ + ${MAKE} ${MAKEFLAGS} -j3 all MAKE_VERSION=00000000 2>&1 | sed 's/^.*"bmake/"bmake/'; \ + echo =========== all ============; \ + find ${.OBJDIR} -type f -o -type l | \ + mkc_test_helper "${PREFIX}" "${.OBJDIR}"; \ + } > $$tmp_out; \ + diff ${.CURDIR}/expect.out $$tmp_out && \ + echo ' succeeded' 1>&2 || \ + { echo ' FAILED' 1>&2; ex=1; }; \ + ${MAKE} ${MAKEFLAGS} cleandir; \ + exit $$ex |