diff options
| author | Kirill Smelkov <kirr@navytux.spb.ru> | 2012-12-09 19:43:40 +0400 |
|---|---|---|
| committer | Kirill Smelkov <kirr@navytux.spb.ru> | 2012-12-09 19:43:40 +0400 |
| commit | 031ff872be7be76c2c088981a827cbb2a29dfc13 (patch) | |
| tree | 7cdda2393a54f9ed6fb25f50987be0ff1542d615 /tests | |
| parent | dbeb4faf21597914534c791f2ca63d3ed7427810 (diff) | |
| download | tinycc-031ff872be7be76c2c088981a827cbb2a29dfc13.tar.gz tinycc-031ff872be7be76c2c088981a827cbb2a29dfc13.tar.bz2 | |
tests: Add tests for compile/run tcc.c with `tcc -b` then compile tcc.c again, then run tcctest.c
Just like with test[123] add their test[123]b variants. After previous 3
patchs all test pass here on Debian GNU/Linux on i385 with gcc-4.7 with
or without memory randomization turned on.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile index da7c3f9..116178f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -12,6 +12,9 @@ TESTS = libtest \ test3 \ speedtest \ btest \ + test1b\ + test2b\ + test3b\ weaktest # test4 # this test does not seem to work on any platform @@ -20,6 +23,9 @@ TESTS = libtest \ # bounds-checking is supported only on i386 ifneq ($(ARCH),i386) TESTS := $(filter-out btest,$(TESTS)) + TESTS := $(filter-out test1b,$(TESTS)) + TESTS := $(filter-out test2b,$(TESTS)) + TESTS := $(filter-out test3b,$(TESTS)) endif # these should work too @@ -87,18 +93,33 @@ test1: test.ref $(TCC) -run tcctest.c > test.out1 @if diff -u test.ref test.out1 ; then echo "Auto Test OK"; fi +test1b: test.ref + @echo ------------ $@ ------------ + $(TCC) -b -run tcctest.c > test.out1b + @if diff -u test.ref test.out1b ; then echo "Auto Test OK"; fi + # iterated test2 (compile tcc then compile tcctest.c !) test2: test.ref @echo ------------ $@ ------------ $(TCC) $(RUN_TCC) $(RUN_TCC) -run tcctest.c > test.out2 @if diff -u test.ref test.out2 ; then echo "Auto Test2 OK"; fi +test2b: test.ref ../bcheck.o + @echo ------------ $@ ------------ + $(TCC) -b $(RUN_TCC) $(RUN_TCC) -run tcctest.c > test.out2b + @if diff -u test.ref test.out2b ; then echo "Auto Test2b OK"; fi + # iterated test3 (compile tcc then compile tcc then compile tcctest.c !) test3: test.ref @echo ------------ $@ ------------ $(TCC) $(RUN_TCC) $(RUN_TCC) $(RUN_TCC) -run tcctest.c > test.out3 @if diff -u test.ref test.out3 ; then echo "Auto Test3 OK"; fi +test3b: test.ref + @echo ------------ $@ ------------ + $(TCC) -b $(RUN_TCC) $(RUN_TCC) $(RUN_TCC) -run tcctest.c > test.out3b + @if diff -u test.ref test.out3b ; then echo "Auto Test3 OK"; fi + # binary output test test4: test.ref @echo ------------ $@ ------------ @@ -190,5 +211,5 @@ cache: tcc_g # clean clean: - rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.gcc \ + rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.gcc \ tcctest[1234] ex? libtcc_test$(EXESUF) tcc_g tcclib.h |
