diff options
| author | James Lyon <jamesly0n@hotmail.com> | 2013-04-17 20:32:07 +0100 |
|---|---|---|
| committer | James Lyon <jamesly0n@hotmail.com> | 2013-04-17 20:32:07 +0100 |
| commit | e31579b0769e1f9c0947d12e83316d1149307b1a (patch) | |
| tree | e37403a22a234a5b760eb172fd1287eca3b193a6 /tests/tests2 | |
| parent | 1d673cbfd619995f2762d3e216f8f0f842effc8c (diff) | |
| download | tinycc-e31579b0769e1f9c0947d12e83316d1149307b1a.tar.gz tinycc-e31579b0769e1f9c0947d12e83316d1149307b1a.tar.bz2 | |
Fixed tests on Windows (including out-of-tree problems)
Modified tcctest.c so that it uses 'double' in place of 'long double'
with MinGW since this is what TCC does, and what Visual C++ does. Added
an option -norunsrc to tcc to allow argv[0] to be set independently of
the compiled source when using tcc -run, which allows tests that rely on
the value of argv[0] to work in out-of-tree builds.
Also added Makefile rules to automatically update out-of-tree build
Makefiles when in-tree Makefiles have changed.
Diffstat (limited to 'tests/tests2')
| -rw-r--r-- | tests/tests2/Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/tests2/Makefile b/tests/tests2/Makefile index bf7511f..9c2e70f 100644 --- a/tests/tests2/Makefile +++ b/tests/tests2/Makefile @@ -13,7 +13,7 @@ ifeq ($(TARGETOS),Darwin) export MACOSX_DEPLOYMENT_TARGET:=10.2 endif -TCC_RUN = $(TOP)/tcc $(TCCFLAGS) -run +TCC = $(TOP)/tcc $(TCCFLAGS) TESTS = \ 00_assignment.test \ @@ -84,8 +84,8 @@ endif %.test: %.c %.expect @echo Test: $*... @if [ "x`echo $* | grep args`" != "x" ]; \ - then $(TCC_RUN) $< - arg1 arg2 arg3 arg4 >$*.output; \ - else $(TCC_RUN) $< >$*.output; \ + then $(TCC) $< -norunsrc -run $(notdir $<) - arg1 arg2 arg3 arg4 >$*.output; \ + else $(TCC) -run $< >$*.output; \ fi @if diff -bu $(<:.c=.expect) $*.output ; \ then rm -f $*.output; \ @@ -96,3 +96,6 @@ all test: $(TESTS) clean: rm -vf fred.txt *.output + +Makefile: $(top_srcdir)/tests/tests2/Makefile + cp $< $@ |
