From e6632fa082714617c2145c2981642f991d31ce77 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 5 Nov 2014 19:44:34 +0100 Subject: add check rule to the makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 54556ea..6c13385 100644 --- a/Makefile +++ b/Makefile @@ -121,6 +121,14 @@ obj/test/%.o: src/test/%.c src/libkeccak/*.h src/libkeccak.h $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -Isrc -c -o $@ $< +.PHONY: check +check: bin/test + env LD_LIBRARY_PATH=bin valgrind --leak-check=full bin/test + test $$(env LD_LIBRARY_PATH=bin valgrind bin/test 2>&1 >/dev/null | wc -l) = 14 +# Using valgrind 3.10.0, its output to standard error should consist of 14 lines, +# the test itself never prints to standard error. + + .PHONY: clean clean: -- cgit v1.2.3-70-g09d2