# the logfiles to carry the raw TAP messages.
TAPFILTER=$(shell command -v $(TAPCONSUMER) || echo cat)
-FAILLOG=/tmp/advent-test.log
-
RUN_TARGETS=$(TESTLOADS:%=run-regress-%)
$(RUN_TARGETS): run-regress-%: %.log
@(test=$(<:.log=); legend=$$(sed -n '/^## /s///p' <"$<" 2>/dev/null || echo "(no description)"); \
OPTS=`sed -n /#options:/s///p $<`; \
- $(advent) $$OPTS <$< | tapdiffer "$<: $${legend}" "$${test}.chk") >>$(FAILLOG)
+ $(advent) $$OPTS <$< | tapdiffer "$<: $${legend}" "$${test}.chk")
multifile-regress:
- @(echo "inven" | advent isofoo.log /dev/stdin) | tapdiffer "multifile: multiple-file test" multifile.chk >>$(FAILLOG)
+ @(echo "inven" | advent isofoo.log /dev/stdin) | tapdiffer "multifile: multiple-file test" multifile.chk
TEST_TARGETS = $(RUN_TARGETS) multifile-regress
tap: count $(TEST_TARGETS)
count:
- @echo 1..$(words $(TEST_TARGETS)) >$(FAILLOG)
+ @echo 1..$(words $(TEST_TARGETS))
tapcheck:
- @make --no-print-directory tap; tapview <$(FAILLOG)
+ @make tap | tapview
# end