From 3d18c9aa64cdf5161453c54ed0302d28019282fe Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sat, 5 Apr 2014 17:35:00 +0200 Subject: [PATCH] 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. --- tests/tests2/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index bd6f2c1d..d523b773 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