summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/Makefile.am2
-rw-r--r--examples/README7
-rw-r--r--tests/Makefile.am8
-rw-r--r--tests/dbus/Makefile.am8
-rw-r--r--tools/Makefile.am1
-rw-r--r--tools/telepathy-glib.supp (renamed from examples/tp-glib-examples.supp)0
-rw-r--r--tools/valgrind.mk13
7 files changed, 23 insertions, 16 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 50bef2a9d..e8fe94091 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,4 +1,4 @@
# extensions has to be compiled first, because other examples need it.
SUBDIRS = extensions client cm
-EXTRA_DIST = tp-glib-examples.supp README
+EXTRA_DIST = README
diff --git a/examples/README b/examples/README
index d96478f3b..64b4e46ec 100644
--- a/examples/README
+++ b/examples/README
@@ -8,11 +8,8 @@ You can get more examples of telepathy-glib usage from:
telepathy-salut, telepathy-sofiasip and telepathy-haze)
* the regression tests (tests/ in the source release)
-telepathy-glib-examples.supp
-----------------------------
-A Valgrind suppressions file, used to check the examples and tests for leaks -
-it may be useful to Telepathy developers, to suppress unwanted messages
-when debugging other Telepathy components.
+A valgrind suppressions file telepathy-glib-examples.supp was previously here,
+but it's been moved to tools/telepathy-glib.supp.
client/list-managers.c
----------------------
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b9159abea..b0ac428db 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -22,15 +22,13 @@ TESTS_ENVIRONMENT = \
G_DEBUG=fatal_warnings,fatal_criticals \
PYTHONPATH=@abs_top_srcdir@/tools
+include $(top_srcdir)/tools/valgrind.mk
+
VALGRIND_TESTS_ENVIRONMENT = \
G_SLICE=always-malloc \
$(TESTS_ENVIRONMENT) \
$(top_builddir)/libtool --mode=execute \
- valgrind --tool=memcheck --leak-check=full --show-reachable=yes \
- --suppressions=$(top_srcdir)/examples/tp-glib-examples.supp \
- --child-silent-after-fork=yes --num-callers=20 --error-exitcode=42 \
- --gen-suppressions=all \
- $(VALGRIND_FLAGS)
+ $(VALGRIND) $(VALGRIND_FLAGS)
check-valgrind:
$(MAKE) check-TESTS \
diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index 026a78ab7..acc8e6b35 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -176,15 +176,13 @@ check-valgrind:
$(MAKE) check-TESTS \
TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)"
+include $(top_srcdir)/tools/valgrind.mk
+
VALGRIND_TESTS_ENVIRONMENT = \
G_SLICE=always-malloc \
$(TESTS_ENVIRONMENT) \
$(top_builddir)/libtool --mode=execute \
- valgrind --tool=memcheck --leak-check=full --show-reachable=yes \
- --suppressions=$(top_srcdir)/examples/tp-glib-examples.supp \
- --child-silent-after-fork=yes --num-callers=20 --error-exitcode=42 \
- --gen-suppressions=all \
- $(VALGRIND_FLAGS)
+ $(VALGRIND) $(VALGRIND_FLAGS)
BUILT_SOURCES = \
dbus-1/session.conf \
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 63260d584..1a3c945d6 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -31,6 +31,7 @@ EXTRA_DIST = \
manager-file.py \
shave.mk \
telepathy.am \
+ telepathy-glib.supp \
telepathy-glib-env.in \
with-session-bus.sh \
xincludator.py
diff --git a/examples/tp-glib-examples.supp b/tools/telepathy-glib.supp
index 5f757601b..5f757601b 100644
--- a/examples/tp-glib-examples.supp
+++ b/tools/telepathy-glib.supp
diff --git a/tools/valgrind.mk b/tools/valgrind.mk
new file mode 100644
index 000000000..ba877370f
--- /dev/null
+++ b/tools/valgrind.mk
@@ -0,0 +1,13 @@
+VALGRIND = valgrind --tool=memcheck \
+ --leak-check=full \
+ --leak-resolution=high \
+ --show-reachable=yes \
+ --suppressions=$(top_srcdir)/tools/telepathy-glib.supp \
+ --child-silent-after-fork=yes \
+ --num-callers=20 \
+ --error-exitcode=42 \
+ --gen-suppressions=all
+
+# other potentially interesting options:
+# --read-var-info=yes better diagnostics from DWARF3 info
+# --track-origins=yes better diagnostics for uninit values (slow)