diff options
Diffstat (limited to 'tests/tests2')
| -rw-r--r-- | tests/tests2/Makefile | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index 587f1e7..67d65a4 100644 --- a/tests/tests2/Makefile +++ b/tests/tests2/Makefile @@ -1,14 +1,16 @@ TOP = ../.. -include $(TOP)/Makefile +include $(TOP)/config.mak +SRC = $(TOPSRC)/tests/tests2 +VPATH = $(SRC) # run local version of tcc with local libraries and includes -TCCFLAGS = -B$(TOP) -I$(TOP) +TCCFLAGS = -B$(TOP) -I$(TOPSRC)/include ifdef CONFIG_WIN32 - TCCFLAGS = -B$(TOP)/win32 -I$(TOP)/include -I$(TOP) -L$(TOP) + TCCFLAGS = -B$(TOPSRC)/win32 -I$(TOPSRC)/include -L$(TOP) endif TCC = $(TOP)/tcc $(TCCFLAGS) -TESTS = $(patsubst %.c,%.test,$(sort $(wildcard *.c))) +TESTS = $(patsubst %.c,%.test,$(sort $(notdir $(wildcard $(SRC)/*.c)))) # 34_array_assignment.test -- array assignment is not in C standard SKIP = 34_array_assignment.test @@ -34,15 +36,16 @@ endif # Some tests might need arguments ARGS = 31_args.test : ARGS = arg1 arg2 arg3 arg4 arg5 -46_grep.test : ARGS = '[^* ]*[:a:d: ]+\:\*-/: $$' 46_grep.c +46_grep.test : ARGS = '[^* ]*[:a:d: ]+\:\*-/: $$' $(SRC)/46_grep.c # Some tests might need different flags 76_dollars_in_identifiers.test : TCCFLAGS += -fdollars-in-identifiers +# Filter source directory in warnings/errors (out-of-tree builds) +FILTER = 2>&1 | sed 's,$(SRC)/,,g' # Filter some always-warning -FILTER = ifeq (-$(findstring arm,$(ARCH))-,-arm-) -FILTER = 2>&1 | grep -v 'warning: soft float ABI currently not supported' +FILTER += 2>&1 | grep -v 'warning: soft float ABI currently not supported' endif all test: $(filter-out $(SKIP),$(TESTS)) @@ -51,10 +54,7 @@ all test: $(filter-out $(SKIP),$(TESTS)) @echo Test: $*... # test -run @$(TCC) -run $< $(ARGS) $(FILTER) >$*.output 2>&1 || true - @diff -Nbu $*.expect $*.output && rm -f $*.output -# test exe (disabled for speed) -# @($(TCC) $(FLAGS) $< -o $*.exe && ./$*.exe $(ARGS)) $(FiLTER) >$*.output2 2>&1 ; \ -# diff -Nbu $*.expect $*.output2 && rm -f $*.output2 $*.exe + @diff -Nbu $(SRC)/$*.expect $*.output && rm -f $*.output # automatically generate .expect files with gcc: %.expect : |
