50
|
1 # $NetBSD$
|
|
2
|
|
3 all: run-tests .WAIT show-diffs
|
|
4
|
|
5 TESTDIR= ${TESTSBASE}/usr.bin/tradcpp
|
|
6
|
|
7 TESTS_SH+= tradcpp
|
|
8
|
|
9 .include <bsd.test.mk>
|
|
10
|
|
11 TRADCPP_OBJDIR!= ${MAKE} -C .. -V .OBJDIR
|
|
12 TRADCPP= ${TRADCPP_OBJDIR}/tradcpp
|
26
|
13
|
46
|
14 TESTS=t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12
|
26
|
15
|
|
16 .for T in $(TESTS)
|
|
17 run-tests: $(T).diff
|
|
18
|
|
19 $(T).diff: $(T).run $(T).good $(TRADCPP)
|
48
|
20 -diff -u $(T).good $(T).run > $(T).diff
|
26
|
21
|
|
22 $(T).run: $(TRADCPP) $(T).c
|
28
|
23 $(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
|
26
|
24 .endfor
|
|
25
|
|
26 show-diffs:
|
|
27 @echo '*** Test diffs ***'
|
|
28 .for T in $(TESTS)
|
|
29 @cat $(T).diff
|
|
30 .endfor
|
|
31
|
|
32 clean:
|
|
33 .for T in $(TESTS)
|
|
34 rm -f $(T).run $(T).diff
|
|
35 .endfor
|
|
36
|
|
37 good:
|
|
38 .for T in $(TESTS)
|
|
39 cp $(T).run $(T).good
|
|
40 .endfor
|
|
41
|
|
42 .PHONY: all run-tests show-diffs clean good
|