]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Allow longer for tests under valgrind
authorSimon McVittie <smcv@collabora.com>
Wed, 11 Jul 2018 18:47:34 +0000 (19:47 +0100)
committerSimon McVittie <smcv@collabora.com>
Thu, 2 Aug 2018 16:15:05 +0000 (17:15 +0100)
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=107194

test/Makefile.am
test/test-utils-glib.c

index 5153ab6cdaab67ae1d78c8d61452c84608357d61..2f338913028497fee84cfa2536b1b8e465c69816 100644 (file)
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
        $(APPARMOR_CFLAGS) \
        $(GLIB_CFLAGS) \
        $(GIO_UNIX_CFLAGS) \
+       $(VALGRIND_CFLAGS) \
        $(NULL)
 
 # improve backtraces from test stuff
index 0fc9fd4ec9c293ea7c19782311a54ae8c179f702..3b447fe81bab4fb9679b669dcaa5a9f0b1cbf4a3 100644 (file)
@@ -48,6 +48,8 @@
 
 #include <dbus/dbus.h>
 
+#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