From b5302c039b91ccb8ebb35b7cf2a321577e156c41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 22 Dec 2016 11:55:55 +0100 Subject: test/core: add make valgrind target --- core/.gitignore | 1 + core/Makefile | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/.gitignore b/core/.gitignore index bc75c33..f14cb69 100644 --- a/core/.gitignore +++ b/core/.gitignore @@ -7,3 +7,4 @@ *.gcda *.gcno *.gcov +*.valgrind diff --git a/core/Makefile b/core/Makefile index 4836427..c96a972 100644 --- a/core/Makefile +++ b/core/Makefile @@ -36,6 +36,13 @@ debug: clean coverage: clean $(MAKE) CFLAGS_EXTRA='--coverage' +valgrind: clean ${ALL} + @for test in ${ALL}; do \ + valgrind --leak-check=full --log-file="$$test.valgrind" "./$$test"; \ + cat "$$test.valgrind"; \ + grep LEAK "$$test.valgrind" >/dev/null && exit 1 || true; \ + done + tis: clean $(MAKE) CC="tis-interpreter.sh --cc" CFLAGS='"${CFLAGS} ${CFLAGS_STD} -DTIS_INTERPRETER=1"' CFLAGS_STD='' LDFLAGS='#' $(ALL) @@ -46,5 +53,6 @@ clean: @rm -f map @rm -f array @rm -f *.gcov *.gcda *.gcno + @rm -f *.valgrind -.PHONY: clean debug coverage tis +.PHONY: clean debug coverage tis valgrind -- cgit v1.2.3