view tests/Makefile @ 54:cf2830e5b81f

Adjust output for expectations of dhtest. Hook t13 up.
author Joerg Sonnenberger <joerg@bec.de>
date Sun, 31 Mar 2013 06:16:08 +0200
parents ce9347338583
children 1b189ab47533
line wrap: on
line source

#	$NetBSD$

all: run-tests .WAIT show-diffs

TESTDIR=	${TESTSBASE}/usr.bin/tradcpp

TESTS_SH+=	tradcpp

.include <bsd.test.mk>

TRADCPP_OBJDIR!=	${MAKE} -C .. -V .OBJDIR
TRADCPP=	${TRADCPP_OBJDIR}/tradcpp

TESTS=t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13

.for T in $(TESTS)
run-tests: $(T).diff

$(T).diff: $(T).run $(T).good $(TRADCPP)
	-diff -u $(T).good $(T).run > $(T).diff

$(T).run: $(TRADCPP) $(T).c
	$(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
.endfor

show-diffs:
	@echo '*** Test diffs ***'
.for T in $(TESTS)
	@cat $(T).diff
.endfor

clean:
.for T in $(TESTS)
	rm -f $(T).run $(T).diff
.endfor

good:
.for T in $(TESTS)
	cp $(T).run $(T).good
.endfor

.PHONY: all run-tests show-diffs clean good