diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-12-04 17:56:24 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-10-21 12:37:46 +0100 |
commit | 30a03399929cf943449968d537499c63019d36b3 (patch) | |
tree | 1a4ee1a650f75a2cab9ba54d454d971a86c1aeea | |
parent | 45869f2d43de75c3fef4b3f5978f096296797257 (diff) |
Add infrastructure for running tests under valgrind
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41129
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | Makefile.am | 3 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/core/Makefile.am | 16 | ||||
-rw-r--r-- | test/interfaces/Makefile.am | 16 |
4 files changed, 39 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 6a02699..dd76c7e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -50,4 +50,7 @@ maintainer-upload-release: rsync -rvzPp --chmod=Dg+s,ug+rwX,o=rX doc/reference/html/ \ dbus.freedesktop.org:/srv/dbus.freedesktop.org/www/doc/@PACKAGE@/ +check-valgrind: all + $(MAKE) -C test check-valgrind + include tools/lcov.am diff --git a/test/Makefile.am b/test/Makefile.am index f743891..379c8c3 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -52,3 +52,7 @@ noinst_PROGRAMS = \ $(test_programs) \ $(test_related_programs) \ $(NULL) + +check-valgrind: all + $(MAKE) -C core check-valgrind + $(MAKE) -C interfaces check-valgrind diff --git a/test/core/Makefile.am b/test/core/Makefile.am index 5bc9952..e4bceb4 100644 --- a/test/core/Makefile.am +++ b/test/core/Makefile.am @@ -30,6 +30,22 @@ else TESTS= endif +VALGRIND_ENV = G_DEBUG=gc-friendly G_SLICE=always-malloc +VALGRIND = valgrind +VALGRIND_ARGS = \ + --gen-suppressions=all \ + --leak-check=full \ + --leak-resolution=high \ + --num-callers=20 \ + --suppressions=$(abs_top_srcdir)/tools/dbus-glib.supp \ + --suppressions=$(abs_top_srcdir)/tools/dbus-glib-tests.supp \ + --verbose \ + $(NULL) + +check-valgrind: all + $(MAKE) check-TESTS \ + DEBUG="env $(VALGRIND_ENV) $(VALGRIND) $(VALGRIND_ARGS)" + EXTRA_DIST=run-test.sh run-peer-test.sh test-service-glib.xml my-object-marshal.list test-service-glib-subclass.xml if DBUS_BUILD_TESTS diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am index f37aa31..a94d08d 100644 --- a/test/interfaces/Makefile.am +++ b/test/interfaces/Makefile.am @@ -25,6 +25,22 @@ else TESTS= endif +VALGRIND_ENV = G_DEBUG=gc-friendly G_SLICE=always-malloc +VALGRIND = valgrind +VALGRIND_ARGS = \ + --gen-suppressions=all \ + --leak-check=full \ + --leak-resolution=high \ + --num-callers=20 \ + --suppressions=$(abs_top_srcdir)/tools/dbus-glib.supp \ + --suppressions=$(abs_top_srcdir)/tools/dbus-glib-tests.supp \ + --verbose \ + $(NULL) + +check-valgrind: all + $(MAKE) check-TESTS \ + DEBUG="env $(VALGRIND_ENV) $(VALGRIND) $(VALGRIND_ARGS)" + EXTRA_DIST = \ invalid-annotated-node.xml \ invalid-nested-annotation.xml \ |