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
|
67
|
14 TESTS=t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13 t14 t15 t16 \
|
|
15 t17 t18 t19
|
26
|
16
|
|
17 .for T in $(TESTS)
|
|
18 run-tests: $(T).diff
|
|
19
|
|
20 $(T).diff: $(T).run $(T).good $(TRADCPP)
|
48
|
21 -diff -u $(T).good $(T).run > $(T).diff
|
26
|
22
|
|
23 $(T).run: $(TRADCPP) $(T).c
|
28
|
24 $(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
|
26
|
25 .endfor
|
|
26
|
|
27 show-diffs:
|
|
28 @echo '*** Test diffs ***'
|
|
29 .for T in $(TESTS)
|
|
30 @cat $(T).diff
|
|
31 .endfor
|
|
32
|
|
33 clean:
|
|
34 .for T in $(TESTS)
|
|
35 rm -f $(T).run $(T).diff
|
|
36 .endfor
|
|
37
|
|
38 good:
|
|
39 .for T in $(TESTS)
|
|
40 cp $(T).run $(T).good
|
|
41 .endfor
|
|
42
|
|
43 .PHONY: all run-tests show-diffs clean good
|