annotate tests/Makefile @ 58:0cd5a1d55ed6

rename joerg's tests to not conflict.
author David A. Holland
date Sun, 31 Mar 2013 01:13:03 -0400
parents a3dd0db23b0c
children a52f0229f22b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
50
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
1 # $NetBSD$
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
2
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
3 all: run-tests .WAIT show-diffs
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
4
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
5 TESTDIR= ${TESTSBASE}/usr.bin/tradcpp
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
6
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
7 TESTS_SH+= tradcpp
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
8
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
9 .include <bsd.test.mk>
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
10
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
11 TRADCPP_OBJDIR!= ${MAKE} -C .. -V .OBJDIR
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
12 TRADCPP= ${TRADCPP_OBJDIR}/tradcpp
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
13
58
0cd5a1d55ed6 rename joerg's tests to not conflict.
David A. Holland
parents: 57
diff changeset
14 TESTS=t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t16 t17 t18 t19
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
15
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
16 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
17 run-tests: $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
18
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
19 $(T).diff: $(T).run $(T).good $(TRADCPP)
48
0af03c5571e0 Use diff -u.
David A. Holland
parents: 46
diff changeset
20 -diff -u $(T).good $(T).run > $(T).diff
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
21
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
22 $(T).run: $(TRADCPP) $(T).c
28
8a955e3dda2c two more tests, more fixes
David A. Holland
parents: 26
diff changeset
23 $(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
24 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
25
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
26 show-diffs:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
27 @echo '*** Test diffs ***'
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
28 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
29 @cat $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
30 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
31
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
32 clean:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
33 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
34 rm -f $(T).run $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
35 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
36
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
37 good:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
38 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
39 cp $(T).run $(T).good
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
40 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
41
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
42 .PHONY: all run-tests show-diffs clean good