diff options
| author | grischka <grischka> | 2016-12-18 22:05:42 +0100 |
|---|---|---|
| committer | grischka <grischka> | 2016-12-18 22:05:42 +0100 |
| commit | a1c12b9fb9bd2452a90d3cf504574b3605c09702 (patch) | |
| tree | 3166ee219d1463f5ed5bfc00aada753502fbe706 /tests/Makefile | |
| parent | f7fc4f02cf15e061b98b2224332b1739c69ef9db (diff) | |
| download | tinycc-a1c12b9fb9bd2452a90d3cf504574b3605c09702.tar.gz tinycc-a1c12b9fb9bd2452a90d3cf504574b3605c09702.tar.bz2 | |
tests: add memory leak test
Also ...
tcctest.c:
- exclude stuff that gcc doesn't compile on windows.
libtcc.c/tccpp.c:
- use unsigned for memory sizes to avoid printf format warnings
- use "file:line: message" to make IDE error parsers happy.
tccgen.c: fix typo
Diffstat (limited to 'tests/Makefile')
| -rw-r--r-- | tests/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile index a86e8a2..0cdca35 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -5,7 +5,7 @@ TOP = .. include $(TOP)/Makefile VPATH = $(TOPSRC)/tests $(TOPSRC) $(TOP) -CFLAGS = -I$(TOPSRC) -I$(TOP) +CFLAGS := $(filter-out -W% -g% -O%,$(CFLAGS)) -I$(TOPSRC) # what tests to run TESTS = \ @@ -13,6 +13,7 @@ TESTS = \ hello-run \ libtest \ test3 \ + memtest \ dlltest \ abitest \ vla_test-run \ @@ -145,6 +146,12 @@ ifndef CONFIG_WIN32 endif @rm tcc2$(EXESUF) libtcc2$(DLLSUF) +memtest: + @echo ------------ $@ ------------ + $(CC) $(CFLAGS) $(NATIVE_DEFINES) -DONE_SOURCE -DMEM_DEBUG=2 ../tcc.c $(LIBS) -o memtest-tcc$(EXESUF) + ./memtest-tcc$(EXESUF) $(TCCFLAGS) $(NATIVE_DEFINES) -DONE_SOURCE ../tcc.c $(LIBS) + ./memtest-tcc$(EXESUF) $(TCCFLAGS) $(NATIVE_DEFINES) -DONE_SOURCE -run ../tcc.c $(TCCFLAGS) tcctest.c + # memory and bound check auto test BOUNDS_OK = 1 4 8 10 14 |
