diff options
Diffstat (limited to 'tests/tests2/Makefile')
| -rw-r--r-- | tests/tests2/Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index 2434215..166fb2a 100644 --- a/tests/tests2/Makefile +++ b/tests/tests2/Makefile @@ -34,6 +34,10 @@ ARGS = 31_args.test : ARGS = arg1 arg2 arg3 arg4 arg5 46_grep.test : ARGS = '[^* ]*[:a:d: ]+\:\*-/: $$' $(SRC)/46_grep.c +# And some tests don't test the right thing with -run +NORUN = +42_function_pointer.test : NORUN = true + # Some tests might need different flags 76_dollars_in_identifiers.test : TCCFLAGS += -fdollars-in-identifiers @@ -49,7 +53,12 @@ all test: $(filter-out $(SKIP),$(TESTS)) %.test: %.c %.expect @echo Test: $*... # test -run - @$(TCC) -run $< $(ARGS) $(FILTER) >$*.output 2>&1 || true + @if test -z "$(NORUN)"; then \ + $(TCC) -run $< $(ARGS) $(FILTER) >$*.output 2>&1 || true; \ + else \ + $(TCC) $< -o ./$*.exe $(FILTER) 2>&1 && \ + ./$*.exe $(ARGS) >$*.output 2>&1 || true; \ + fi @diff -Nbu $(SRC)/$*.expect $*.output && rm -f $*.output # automatically generate .expect files with gcc: |
