annotate tests/Makefile @ 26:ac45dcc57ff9

add some simple tests
author David A. Holland
date Mon, 20 Dec 2010 05:01:07 -0500
parents
children 8a955e3dda2c
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
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
3 TESTS=t01 t02 t03 t04 t05 t06 t07
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
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
14 $(TRADCPP) $(T).c $(T).run
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