From eff1f10a090a29ab67f417856b1caa5c27ed86e1 Mon Sep 17 00:00:00 2001 From: Magnus Ahltorp Date: Fri, 12 Feb 2016 17:39:50 +0100 Subject: Make valgrind exit with error code --- c_src/Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'c_src') diff --git a/c_src/Makefile b/c_src/Makefile index d065d6e..fc18e41 100644 --- a/c_src/Makefile +++ b/c_src/Makefile @@ -55,18 +55,20 @@ permdb.so: $(permdbso_OBJS) permdbtest: $(permdbtest_OBJS) $(CC) $(permdbtest_OBJS) $(LDFLAGS) -o permdbtest +VALGRIND = valgrind --leak-check=full --error-exitcode=1 -q + permdb-valgrind: permdbtest rm /tmp/permdb-valgrind-test /tmp/permdb-valgrind-test.idx - valgrind --leak-check=full ./permdbtest /tmp/permdb-valgrind-test 10000 2048 1000 + $(VALGRIND) ./permdbtest /tmp/permdb-valgrind-test 10000 2048 1000 rm /tmp/permdb-valgrind-test.idx - valgrind --leak-check=full ./permdbtest /tmp/permdb-valgrind-test 10000 2048 1000 + $(VALGRIND) ./permdbtest /tmp/permdb-valgrind-test 10000 2048 1000 rm /tmp/permdb-valgrind-test /tmp/permdb-valgrind-test.idx - valgrind --leak-check=full ./permdbtest /tmp/permdb-valgrind-test 10000 2048 1000 - valgrind --leak-check=full ./permdbtest /tmp/permdb-valgrind-test 10000 2048 1000 + $(VALGRIND) ./permdbtest /tmp/permdb-valgrind-test 10000 2048 1000 + $(VALGRIND) ./permdbtest /tmp/permdb-valgrind-test 10000 2048 1000 rm /tmp/permdb-valgrind-test /tmp/permdb-valgrind-test.idx - valgrind --leak-check=full ./permdbtest /tmp/permdb-valgrind-test 10 99 1 + $(VALGRIND) ./permdbtest /tmp/permdb-valgrind-test 10 99 1 rm /tmp/permdb-valgrind-test.idx - valgrind --leak-check=full ./permdbtest /tmp/permdb-valgrind-test 10 99 1 + $(VALGRIND) ./permdbtest /tmp/permdb-valgrind-test 10 99 1 rm /tmp/permdb-valgrind-test /tmp/permdb-valgrind-test.idx - valgrind --leak-check=full ./permdbtest /tmp/permdb-valgrind-test 10 99 1 - valgrind --leak-check=full ./permdbtest /tmp/permdb-valgrind-test 10 99 1 + $(VALGRIND) ./permdbtest /tmp/permdb-valgrind-test 10 99 1 + $(VALGRIND) ./permdbtest /tmp/permdb-valgrind-test 10 99 1 -- cgit v1.1