[telepathy-mission-control/master] mc-debug-server: always set GLib and GObject warnings fatal for regression tests

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Oct 20 09:58:31 PDT 2009


In practice, GObject warnings tend to indicate fairly critical badness, so
we don't want the tests to trip them.

Because MC still uses g_warning() for relatively normal things like failed
requests, we can't just make *all* warnings fatal.
---
 test/twisted/mc-debug-server.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/test/twisted/mc-debug-server.c b/test/twisted/mc-debug-server.c
index 92b7209..35578a9 100644
--- a/test/twisted/mc-debug-server.c
+++ b/test/twisted/mc-debug-server.c
@@ -161,6 +161,13 @@ main (int argc, char **argv)
     mcd_debug_init ();
     tp_debug_set_flags (g_getenv ("MC_TP_DEBUG"));
 
+    /* Not all warnings are fatal due to MC spamming warnings (fd.o #23486),
+     * but GLib and GObject warnings are pretty serious */
+    g_log_set_fatal_mask ("GLib",
+        G_LOG_FATAL_MASK | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
+    g_log_set_fatal_mask ("GLib-GObject",
+        G_LOG_FATAL_MASK | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
+
     bus_daemon = tp_dbus_daemon_dup (&error);
 
     if (bus_daemon == NULL)
-- 
1.5.6.5




More information about the telepathy-commits mailing list