mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-04 06:30:10 +08:00
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.
This commit is contained in:
parent
0688afdd34
commit
3d18c9aa64
@ -94,13 +94,18 @@ endif
|
|||||||
@if [ "x`echo $* | grep args`" != "x" ]; \
|
@if [ "x`echo $* | grep args`" != "x" ]; \
|
||||||
then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output 2>&1; \
|
then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output 2>&1; \
|
||||||
else $(TCC) -run $< >$*.output 2>&1; \
|
else $(TCC) -run $< >$*.output 2>&1; \
|
||||||
|
($(TCC) -o $*.exe $< -lm && ./$*.exe) >$*.output2 2>&1; \
|
||||||
fi || true
|
fi || true
|
||||||
@if diff -bu $(<:.c=.expect) $*.output ; \
|
@if diff -bu $(<:.c=.expect) $*.output ; \
|
||||||
then rm -f $*.output; \
|
then rm -f $*.output; \
|
||||||
else exit 1; \
|
else exit 1; \
|
||||||
fi
|
fi
|
||||||
|
@if test -f $*.output2; then if diff -bu $(<:.c=.expect) $*.output2 ; \
|
||||||
|
then rm -f $*.output2; \
|
||||||
|
else exit 1; \
|
||||||
|
fi; fi
|
||||||
|
|
||||||
all test: $(TESTS)
|
all test: $(TESTS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -vf fred.txt *.output
|
rm -vf fred.txt *.output* *.exe
|
||||||
|
Loading…
Reference in New Issue
Block a user