diff options
| author | grischka <grischka> | 2017-04-25 21:01:54 +0200 |
|---|---|---|
| committer | grischka <grischka> | 2017-04-25 21:01:54 +0200 |
| commit | 7acf9aa86275a24b468786d6ea9f308ae33f011c (patch) | |
| tree | 5bc1c65e4a894185de1d45456d662e7b1297fa25 /tests | |
| parent | fb4f57666cf23aa94d6ef421383013e6a0dc12cc (diff) | |
| download | tinycc-7acf9aa86275a24b468786d6ea9f308ae33f011c.tar.gz tinycc-7acf9aa86275a24b468786d6ea9f308ae33f011c.tar.bz2 | |
final adjustments for release
- configure/Makefiles: minor adjustments
- build-tcc.bat: add -static to gcc options
(avoids libgcc_s*.dll dependency with some mingw versions)
- tccpe.c/tcctools.c: eliminate MAX_PATH
(not available for cross compilers)
- tccasm.c: use uint64_t/strtoull in unary()
(unsigned long sometimes is only uint32_t, as always on windows)
- tccgen.c: Revert (f077d16c) "tccgen: gen_cast: cast FLOAT to DOUBLE"
Was a rather experimental, tentative commit, not really necessary
and somewhat ugly too.
- cleanup recent osx support:
- Makefile/libtcc.c: cleanup copy&paste code
- tccpp.c: restore deleted function
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 31 | ||||
| -rw-r--r-- | tests/tests2/Makefile | 33 |
2 files changed, 29 insertions, 35 deletions
diff --git a/tests/Makefile b/tests/Makefile index e4e2556..7de3d81 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,7 +5,7 @@ TOP = .. include $(TOP)/Makefile VPATH = $(TOPSRC)/tests $(TOPSRC) $(TOP) -CFLAGS := $(filter-out -W% -g% -O%,$(CFLAGS)) -I$(TOPSRC) +CFLAGS := $(filter-out -W% -g% -O%,$(CFLAGS)) -I$(TOPSRC) $(LDFLAGS) # what tests to run TESTS = \ @@ -34,8 +34,8 @@ endif ifdef CONFIG_WIN32 TESTS := $(filter-out $(BTESTS),$(TESTS)) endif -ifeq ($(TARGETOS),Darwin) - TESTS := $(filter-out hello-exe test3 $(BTESTS),$(TESTS)) +ifdef CONFIG_OSX # -run only + TESTS := hello-run libtest tests2-dir pp-dir endif ifeq (,$(filter arm64 i386 x86_64,$(ARCH))) TESTS := $(filter-out vla_test-run,$(TESTS)) @@ -51,28 +51,23 @@ ifndef CONFIG_CROSS endif ifdef CONFIG_WIN32 - PATH := $(CURDIR)/$(TOP):$(PATH) # for libtcc_test to find libtcc.dll -endif - -ifeq ($(TARGETOS),Darwin) - CFLAGS += -Wl,-flat_namespace,-undefined,warning - TCCFLAGS += -D_ANSI_SOURCE - export MACOSX_DEPLOYMENT_TARGET:=10.2 + SEP = $(if $(findstring :\,$(PATH)),;,:) + PATH := $(CURDIR)/$(TOP)$(SEP)$(PATH) # for libtcc_test to find libtcc.dll endif RUN_TCC = $(NATIVE_DEFINES) -DONE_SOURCE -run $(TOPSRC)/tcc.c $(TCCFLAGS) - DISAS = objdump -d +DUMPTCC = (set -x; $(TOP)/tcc -vv; ldd $(TOP)/tcc; exit 1) all test : clean-s $(TESTS) hello-exe: ../examples/ex1.c @echo ------------ $@ ------------ - $(TCC) $< -o hello$(EXESUF) || ($(TOP)/tcc -vv; exit 1) && ./hello$(EXESUF) + $(TCC) $< -o hello$(EXESUF) && ./hello$(EXESUF) || $(DUMPTCC) hello-run: ../examples/ex1.c @echo ------------ $@ ------------ - $(TCC) -run $< + $(TCC) -run $< || $(DUMPTCC) libtest: libtcc_test$(EXESUF) @echo ------------ $@ ------------ @@ -263,11 +258,11 @@ cache: tcc_g # clean clean: - rm -f *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc *.gcc \ - *-cc *-gcc *-tcc *.exe hello libtcc_test vla_test tcctest[1234] \ - ex? tcc_g *.def weaktest.*.txt - $(MAKE) -C tests2 $@ - $(MAKE) -C pp $@ + rm -f *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc *.gcc + rm -f *-cc *-gcc *-tcc *.exe hello libtcc_test vla_test tcctest[1234] + rm -f ex? tcc_g weaktest.*.txt *.def + @$(MAKE) -C tests2 $@ + @$(MAKE) -C pp $@ # silent clean, used before running tests clean-s: diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index b8d6a49..e921f57 100644 --- a/tests/tests2/Makefile +++ b/tests/tests2/Makefile @@ -5,23 +5,6 @@ VPATH = $(SRC) 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 - -# some tests do not pass on all platforms, remove them for now -ifeq ($(CONFIG_arm_eabi),yes) # not ARM soft-float - SKIP += 22_floating_point.test -endif -ifeq ($(TARGETOS),Darwin) - SKIP += 40_stdio.test -endif -ifeq ($(ARCH),x86_64) - SKIP += 73_arm64.test -endif -ifeq (,$(filter i386 x86_64,$(ARCH))) - SKIP += 85_asm-outside-function.test -endif - # Some tests might need arguments ARGS = 31_args.test : ARGS = arg1 arg2 arg3 arg4 arg5 @@ -42,6 +25,22 @@ ifeq (-$(findstring arm,$(ARCH))-,-arm-) FILTER += 2>&1 | grep -v 'warning: soft float ABI currently not supported' endif +# some tests do not pass on all platforms, remove them for now +SKIP = 34_array_assignment.test # array assignment is not in C standard +ifeq ($(CONFIG_arm_eabi),yes) # not ARM soft-float + SKIP += 22_floating_point.test +endif +ifdef CONFIG_OSX + SKIP += 40_stdio.test 42_function_pointer.test + FLAGS += -w +endif +ifeq ($(ARCH),x86_64) + SKIP += 73_arm64.test +endif +ifeq (,$(filter i386 x86_64,$(ARCH))) + SKIP += 85_asm-outside-function.test +endif + all test: $(filter-out $(SKIP),$(TESTS)) %.test: %.c %.expect |
