annotate tests/Makefile @ 49:8a204d153398

Intercept multiline comments earlier. Leave same-line comments alone. Fixes all of the pathological comment behavior we've noticed so far.
author David A. Holland
date Sun, 31 Mar 2013 01:04:43 -0400
parents 0af03c5571e0
children a52f0229f22b 737ffe27b4bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
1 TRADCPP=../obj/tradcpp # XXX
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
2
49
8a204d153398 Intercept multiline comments earlier. Leave same-line comments alone.
David A. Holland
parents: 48
diff changeset
3 TESTS=t01 t02 t03 t04 t05 t06 t07 t08 t09 t10 t11 t12 t13 t14 t15
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
4
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
5 all: run-tests .WAIT show-diffs
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
6
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
7 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
8 run-tests: $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
9
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
10 $(T).diff: $(T).run $(T).good $(TRADCPP)
48
0af03c5571e0 Use diff -u.
David A. Holland
parents: 46
diff changeset
11 -diff -u $(T).good $(T).run > $(T).diff
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
12
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
13 $(T).run: $(TRADCPP) $(T).c
28
8a955e3dda2c two more tests, more fixes
David A. Holland
parents: 26
diff changeset
14 $(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
15 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
16
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
17 show-diffs:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
18 @echo '*** Test diffs ***'
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
19 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
20 @cat $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
21 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
22
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
23 clean:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
24 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
25 rm -f $(T).run $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
26 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
27
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
28 good:
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 cp $(T).run $(T).good
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 .PHONY: all run-tests show-diffs clean good