annotate tests/Makefile @ 38:b156910b59b2

Wrap free() in dofree() to allow instrumenting it for debugging.
author David A. Holland
date Sat, 30 Mar 2013 21:02:25 -0400
parents b30f69cab9bc
children eaa154ded584
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
35
b30f69cab9bc Add another test.
David A. Holland
parents: 28
diff changeset
3 TESTS=t01 t02 t03 t04 t05 t06 t07 t08 t09 t10
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)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
11 -diff $(T).good $(T).run > $(T).diff
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