summaryrefslogtreecommitdiff
path: root/mk/mkc.minitest.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/mkc.minitest.mk')
-rw-r--r--mk/mkc.minitest.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/mk/mkc.minitest.mk b/mk/mkc.minitest.mk
index e62be8a..168073f 100644
--- a/mk/mkc.minitest.mk
+++ b/mk/mkc.minitest.mk
@@ -5,20 +5,21 @@
TEST_PREREQS ?= all
+_tmp_out:=${.OBJDIR}/${.CURDIR:T}.test.out
+
.PHONY : test
test: ${TEST_PREREQS}
@echo 'Testing ${.CURDIR}... ' 1>&2; \
set -e; cd ${.CURDIR}; \
- tmp_out=${.OBJDIR}/${.CURDIR:T}.test.out; \
- ${RM} -f $$tmp_out; \
- ${MAKE} ${MAKEFLAGS} test_output > $$tmp_out.tmp; \
- mv $$tmp_out.tmp $$tmp_out; \
+ ${RM} -f ${_tmp_out}; \
+ ${MAKE} ${MAKEFLAGS} test_output > ${_tmp_out}.tmp; \
+ mv ${_tmp_out}.tmp ${_tmp_out}; \
if test -f ${.CURDIR}/expect.${OPSYS}.out; then \
expect=${.CURDIR}/expect.${OPSYS}.out; \
else \
expect=${.CURDIR}/expect.out; \
fi; \
- diff $$expect $$tmp_out && \
+ diff $$expect ${_tmp_out} && \
echo ' succeeded' 1>&2 || \
{ echo ' FAILED' 1>&2; false; }