[telepathy-glib/master] tests: improve normal and valgrind environments
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Dec 3 06:50:58 PST 2009
Normally, run with G_SLICE=debug-blocks (so GLib finds our bugs).
Under valgrind, use G_DEBUG=gc-friendly and G_SLICE=always-malloc.
Also fix a typo that resulted in check-valgrind not actually valgrinding
the non-D-Bus tests (missing '\').
---
tests/Makefile.am | 8 +++++---
tests/dbus/Makefile.am | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 90213bc..788346c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,20 +19,22 @@ TESTS = $(noinst_PROGRAMS) \
TESTS_ENVIRONMENT = \
abs_top_builddir=@abs_top_builddir@ \
abs_top_srcdir=@abs_top_srcdir@ \
- G_DEBUG=fatal_warnings,fatal_criticals \
+ G_SLICE=debug-blocks \
+ G_DEBUG=fatal_warnings,fatal_criticals$(maybe_gc_friendly) \
PYTHONPATH=@abs_top_srcdir@/tools
include $(top_srcdir)/tools/valgrind.mk
VALGRIND_TESTS_ENVIRONMENT = \
- G_SLICE=always-malloc \
$(TESTS_ENVIRONMENT) \
+ G_SLICE=always-malloc \
$(top_builddir)/libtool --mode=execute \
$(VALGRIND) $(VALGRIND_FLAGS)
check-valgrind:
$(MAKE) check-TESTS \
- TESTS='$$(noinst_PROGRAMS)'
+ maybe_gc_friendly=,gc-friendly \
+ TESTS='$$(noinst_PROGRAMS)' \
TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)"
$(MAKE) -C dbus check-valgrind
diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index acc8e6b..18ccb8c 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -168,19 +168,21 @@ TESTS_ENVIRONMENT = \
abs_top_builddir=@abs_top_builddir@ \
XDG_DATA_HOME=@abs_builddir@ \
XDG_DATA_DIRS=@abs_srcdir@ \
- G_DEBUG=fatal_warnings,fatal_criticals \
+ G_SLICE=debug-blocks \
+ G_DEBUG=fatal_warnings,fatal_criticals$(maybe_gc_friendly) \
sh $(top_srcdir)/tools/with-session-bus.sh \
- --config-file=dbus-1/session.conf --
+ --config-file=dbus-1/session.conf --
check-valgrind:
$(MAKE) check-TESTS \
+ maybe_gc_friendly=,gc-friendly \
TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)"
include $(top_srcdir)/tools/valgrind.mk
VALGRIND_TESTS_ENVIRONMENT = \
- G_SLICE=always-malloc \
$(TESTS_ENVIRONMENT) \
+ env G_SLICE=always-malloc \
$(top_builddir)/libtool --mode=execute \
$(VALGRIND) $(VALGRIND_FLAGS)
--
1.5.6.5
More information about the telepathy-commits
mailing list