From 6e043fbdfbef5fff345e57bb2b323a4d6ec0150a Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Tue, 22 Jan 2019 16:56:22 +0100 Subject: [PATCH] add valgrind checks --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 873a118d..8fcf1dde 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,11 @@ functest: bin/functest_$(subst /,_,$(SCHEME)) run-functest: bin/functest_$(subst /,_,$(SCHEME)) ./$< +.PHONY: run-valgrind +run-valgrind: bin/functest_$(subst /,_,$(SCHEME)) + valgrind --leak-check=full --error-exitcode=1 $< + + bin/testvectors_$(subst /,_,$(SCHEME)): test/$(dir $(SCHEME))testvectors.c $(wildcard $(SCHEME)/clean/*.c) $(wildcard $(SCHEME)/clean/*.h) | require_scheme mkdir -p bin $(CC) $(CFLAGS) \ @@ -98,6 +103,8 @@ help: @echo "make run-testvectors-all Run all testvector checks" @echo "make run-symbol-namespace SCHEME=scheme Run symbol namespace checks for SCHEME" @echo "make run-symbol-namespace-all Run all symbol namespace checks" + @echo "make run-valgrind SCHEME=scheme Run valgrind checks for SCHEME" + @echo "make run-valgrind-all Run valgrind checks all schemes" @echo "make clean Clean up the bin/ folder" @echo "make format Automatically formats all the source code" @echo "make tidy SCHEME=scheme Runs the clang-tidy linter against SCHEME" @@ -112,6 +119,12 @@ functest-all: $(MAKE) functest SCHEME=$$scheme || exit 1; \ done +.PHONY: run-valgrind-all +run-valgrind-all: + @for scheme in $(ALL_SCHEMES); do \ + $(MAKE) run-valgrind SCHEME=$$scheme || exit 1; \ + done + .PHONY: run-testvectors run-testvectors: test/check_testvectors.py | require_scheme python3 test/check_testvectors.py $(SCHEME) || exit 1; \ @@ -141,7 +154,7 @@ run-functest-all: functest-all @echo Tests completed .PHONY: test-all -test-all: run-functest-all run-testvectors-all run-symbol-namespace-all +test-all: run-functest-all run-valgrind-all run-testvectors-all run-symbol-namespace-all .PHONY: tidy-all tidy-all: