History

tests2: Build executables as well

The individual tests in tests2 are checked only with -run. Build (and check) executables as well, to test also building executables.

Michael Matz committed 12 years ago

Commit 3d18c9a1 parent 0688afd1 file · +6 −1Browse files

Unified · Split

tests/tests2/Makefile+6−1
@@ -94,13 +94,18 @@ endif · 93 unmodified lines
94 @if [ "x`echo $* | grep args`" != "x" ]; \94 @if [ "x`echo $* | grep args`" != "x" ]; \
95 then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output 2>&1; \95 then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output 2>&1; \
96 else $(TCC) -run $< >$*.output 2>&1; \96 else $(TCC) -run $< >$*.output 2>&1; \
97 ($(TCC) -o $*.exe $< -lm && ./$*.exe) >$*.output2 2>&1; \
97 fi || true98 fi || true
98 @if diff -bu $(<:.c=.expect) $*.output ; \99 @if diff -bu $(<:.c=.expect) $*.output ; \
99 then rm -f $*.output; \100 then rm -f $*.output; \
100 else exit 1; \101 else exit 1; \
101 fi102 fi
103 @if test -f $*.output2; then if diff -bu $(<:.c=.expect) $*.output2 ; \
104 then rm -f $*.output2; \
105 else exit 1; \
106 fi; fi
102 107
103all test: $(TESTS)108all test: $(TESTS)
104 109
105clean:110clean:
106 rm -vf fred.txt *.output111 rm -vf fred.txt *.output* *.exe

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t