annotate tests/Makefile @ 67:737ffe27b4bd

Merge
author Joerg Sonnenberger <joerg@bec.de>
date Sun, 31 Mar 2013 07:19:49 +0200
parents 8a204d153398 a3dd0db23b0c
children 8eee66a25533
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
67
Joerg Sonnenberger <joerg@bec.de>
parents: 49 57
diff changeset
14 TESTS=t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13 t14 t15 t16 \
Joerg Sonnenberger <joerg@bec.de>
parents: 49 57
diff changeset
15 t17 t18 t19
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
16
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
17 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
18 run-tests: $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
19
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
20 $(T).diff: $(T).run $(T).good $(TRADCPP)
48
0af03c5571e0 Use diff -u.
David A. Holland
parents: 46
diff changeset
21 -diff -u $(T).good $(T).run > $(T).diff
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
22
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
23 $(T).run: $(TRADCPP) $(T).c
28
8a955e3dda2c two more tests, more fixes
David A. Holland
parents: 26
diff changeset
24 $(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
25 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
27 show-diffs:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
28 @echo '*** Test diffs ***'
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
29 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
30 @cat $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
31 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
32
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
33 clean:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
34 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
35 rm -f $(T).run $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
36 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
37
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
38 good:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
39 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
40 cp $(T).run $(T).good
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
41 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
42
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
43 .PHONY: all run-tests show-diffs clean good