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.
master
Michael Matz 2014-04-05 17:35:00 +02:00
parent 0688afdd34
commit 3d18c9aa64
1 changed files with 6 additions and 1 deletions

View File

@ -94,13 +94,18 @@ endif
@if [ "x`echo $* | grep args`" != "x" ]; \
then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output 2>&1; \
else $(TCC) -run $< >$*.output 2>&1; \
($(TCC) -o $*.exe $< -lm && ./$*.exe) >$*.output2 2>&1; \
fi || true
@if diff -bu $(<:.c=.expect) $*.output ; \
then rm -f $*.output; \
else exit 1; \
fi
@if test -f $*.output2; then if diff -bu $(<:.c=.expect) $*.output2 ; \
then rm -f $*.output2; \
else exit 1; \
fi; fi
all test: $(TESTS)
clean:
rm -vf fred.txt *.output
rm -vf fred.txt *.output* *.exe