From: Simon McVittie Date: Wed, 11 Jul 2018 18:47:34 +0000 (+0100) Subject: Allow longer for tests under valgrind X-Git-Tag: dbus-1.13.6~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07d6eab420eaf594634b08d523de733f364eec2a;p=thirdparty%2Fdbus.git Allow longer for tests under valgrind Signed-off-by: Simon McVittie Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194 --- diff --git a/test/Makefile.am b/test/Makefile.am index 5153ab6cd..2f3389130 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -15,6 +15,7 @@ AM_CPPFLAGS = \ $(APPARMOR_CFLAGS) \ $(GLIB_CFLAGS) \ $(GIO_UNIX_CFLAGS) \ + $(VALGRIND_CFLAGS) \ $(NULL) # improve backtraces from test stuff diff --git a/test/test-utils-glib.c b/test/test-utils-glib.c index 0fc9fd4ec..3b447fe81 100644 --- a/test/test-utils-glib.c +++ b/test/test-utils-glib.c @@ -48,6 +48,8 @@ #include +#include "dbus/dbus-valgrind-internal.h" + #ifdef G_OS_WIN # define isatty(x) _isatty(x) #endif @@ -583,6 +585,9 @@ set_timeout (guint factor) if (timeout != 0) g_source_remove (timeout); + if (RUNNING_ON_VALGRIND) + factor = factor * 10; + timeout = g_timeout_add_seconds (TIMEOUT * factor, time_out, NULL); #ifdef G_OS_UNIX /* The GLib main loop might not be running (we don't use it in every