aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2014-04-05 17:35:00 +0200
committerMichael Matz <matz@suse.de>2014-04-05 17:35:00 +0200
commit3d18c9aa64cdf5161453c54ed0302d28019282fe (patch)
treee9ca4aea015d738d9fdd6fed335def1fa8c5e828
parent0688afdd34c7c2a4696d22f68497a7a887e6cc37 (diff)
downloadtinycc-3d18c9aa64cdf5161453c54ed0302d28019282fe.tar.gz
tinycc-3d18c9aa64cdf5161453c54ed0302d28019282fe.tar.bz2
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.
-rw-r--r--tests/tests2/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile
index bd6f2c1..d523b77 100644
--- a/tests/tests2/Makefile
+++ b/tests/tests2/Makefile
@@ -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