[Tests] add valgrind targets in the Makefile: leakcheck, leakcheck-reachable and massif

This commit is contained in:
Benjamin Dauvergne 2010-09-17 17:00:21 +02:00
parent 19aad7629a
commit 88623c29f3
1 changed files with 23 additions and 0 deletions

View File

@ -40,6 +40,29 @@ perfs_SOURCES = perfs.c
perfs_LDADD = $(top_builddir)/lasso/liblasso.la $(LASSO_LIBS)
perfs_LDFLAGS = -rpath `cd $(top_builddir)/lasso/.libs/; pwd`
.PHONY: valgrind
LEAKCHECK = G_DEBUG=gc-friendly MALLOC_CHECK_=2 G_SLICE=always-malloc CK_FORK=no \
valgrind --leak-check=full --log-file=valgrind.log \
--suppressions=$(top_srcdir)/tests/valgrind/glib.supp \
--suppressions=$(top_srcdir)/tests/valgrind/openssl.supp \
--suppressions=$(top_srcdir)/tests/valgrind/lasso.supp \
--num-callers=50
LEAKCHECK_REACHABLE = $(LEAKCHECK) --show-reachable=yes
MASSIF = G_DEBUG=gc-friendly MALLOC_CHECK_=2 G_SLICE=always-malloc CK_FORK=no \
valgrind --tool=massif
leakcheck:
$(LEAKCHECK) ./tests
leakcheck-reachable:
$(LEAKCHECK_REACHABLE) ./tests
massif:
$(MASSIF) ./tests
endif
EXTRA_DIST = metadata valgrind tests.h $(tests_SOURCES)