annotate tests/Makefile @ 165:cc6d6f27d6ee

Fix Joerg's #line code. (avoid redundant whitespace grinding, don't use atoi, be simpler and tidier, etc.)
author David A. Holland
date Fri, 12 Jun 2015 01:30:13 -0400
parents 82cc6fa54b01
children 879fd8f0dd53
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
cf4c97cebbd9 Get the parent objdir correctly. hi joerg
David A. Holland
parents: 59
diff changeset
1 TRADCPP_OBJDIR!= ${MAKE} -C ${.CURDIR}/.. -V .OBJDIR
50
ce9347338583 ATF glue
Joerg Sonnenberger <joerg@bec.de>
parents: 48
diff changeset
2 TRADCPP= ${TRADCPP_OBJDIR}/tradcpp
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
3
59
David A. Holland
parents: 58 49
diff changeset
4 TESTS=\
David A. Holland
parents: 58 49
diff changeset
5 t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13 t14 t15 t16 \
145
a403605d3166 Fix handling of macros in quoted strings.
David A. Holland
parents: 132
diff changeset
6 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 t31 t32 \
162
82cc6fa54b01 newline during a macro invocation counts as space. Behavior differs from
Joerg Sonnenberger <joerg@bec.de>
parents: 159
diff changeset
7 t33 t34 t35 t36 t37 t38 t39
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
8
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
9 all: run-tests .WAIT show-diffs
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
10
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
11 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
12 run-tests: $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
13
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
14 $(T).diff: $(T).run $(T).good $(TRADCPP)
48
0af03c5571e0 Use diff -u.
David A. Holland
parents: 46
diff changeset
15 -diff -u $(T).good $(T).run > $(T).diff
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 $(T).run: $(TRADCPP) $(T).c
28
8a955e3dda2c two more tests, more fixes
David A. Holland
parents: 26
diff changeset
18 $(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
19 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
20
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
21 show-diffs:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
22 @echo '*** Test diffs ***'
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
23 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
24 @cat $(T).diff
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 clean:
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 rm -f $(T).run $(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 good:
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 cp $(T).run $(T).good
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 .PHONY: all run-tests show-diffs clean good
59
David A. Holland
parents: 58 49
diff changeset
38
David A. Holland
parents: 58 49
diff changeset
39 ############################################################
David A. Holland
parents: 58 49
diff changeset
40
David A. Holland
parents: 58 49
diff changeset
41 .if defined(ALLOW_BROKEN_ATF_POLLUTION)
David A. Holland
parents: 58 49
diff changeset
42 TESTDIR= ${TESTSBASE}/usr.bin/tradcpp
David A. Holland
parents: 58 49
diff changeset
43 TESTS_SH+= tradcpp
David A. Holland
parents: 58 49
diff changeset
44 .include <bsd.test.mk>
David A. Holland
parents: 58 49
diff changeset
45 .endif