summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-09-17 17:00:21 +0200
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2010-09-17 17:02:41 +0200
commit88623c29f3dfb56483138961a4a906c75f48e355 (patch)
tree7d71195a4cef99f20cde5ba0c2d283a2ea41e7f6 /tests
parent19aad7629ad4c41a7b95ad0603cc72b59dbf07e6 (diff)
downloadlasso-88623c29f3dfb56483138961a4a906c75f48e355.tar.gz
lasso-88623c29f3dfb56483138961a4a906c75f48e355.tar.xz
lasso-88623c29f3dfb56483138961a4a906c75f48e355.zip
[Tests] add valgrind targets in the Makefile: leakcheck, leakcheck-reachable and massif
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)