annotate tests/Makefile @ 122:64c4de3709de

Complain if -[DIU] is given an empty argument. (Like many compilers over the years, we don't accept the argument appearing in the next argv word.) Warn about this in the man page too.
author David A. Holland
date Tue, 11 Jun 2013 18:32:41 -0400
parents 4f493fb35821
children cb08e397ce7b
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 \
119
4f493fb35821 Test empty arguments.
David A. Holland
parents: 106
diff changeset
6 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
7
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
8 all: run-tests .WAIT show-diffs
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
9
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
10 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
11 run-tests: $(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).diff: $(T).run $(T).good $(TRADCPP)
48
0af03c5571e0 Use diff -u.
David A. Holland
parents: 46
diff changeset
14 -diff -u $(T).good $(T).run > $(T).diff
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
15
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
16 $(T).run: $(TRADCPP) $(T).c
28
8a955e3dda2c two more tests, more fixes
David A. Holland
parents: 26
diff changeset
17 $(TRADCPP) $(T).c > $(T).run 2>&1 || echo FAILED >> $(T).run
26
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
18 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
19
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
20 show-diffs:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
21 @echo '*** Test diffs ***'
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
22 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
23 @cat $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
24 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
25
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
26 clean:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
27 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
28 rm -f $(T).run $(T).diff
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
29 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
30
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
31 good:
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
32 .for T in $(TESTS)
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
33 cp $(T).run $(T).good
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
34 .endfor
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
35
ac45dcc57ff9 add some simple tests
David A. Holland
parents:
diff changeset
36 .PHONY: all run-tests show-diffs clean good
59
David A. Holland
parents: 58 49
diff changeset
37
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 .if defined(ALLOW_BROKEN_ATF_POLLUTION)
David A. Holland
parents: 58 49
diff changeset
41 TESTDIR= ${TESTSBASE}/usr.bin/tradcpp
David A. Holland
parents: 58 49
diff changeset
42 TESTS_SH+= tradcpp
David A. Holland
parents: 58 49
diff changeset
43 .include <bsd.test.mk>
David A. Holland
parents: 58 49
diff changeset
44 .endif