summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 20b408b0..15eb4e9a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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)