[glib/gdbus-daemon: 6/6] Support using gdbus-daemon in testsuite by setting G_DBUS_DAEMON



commit ad77d7244f4fc0d185b1b9d7f152118e6ea72cae
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Apr 16 10:51:07 2012 +0200

    Support using gdbus-daemon in testsuite by setting G_DBUS_DAEMON

 gio/tests/gdbus-sessionbus.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gdbus-sessionbus.c b/gio/tests/gdbus-sessionbus.c
index f39583c..37648f2 100644
--- a/gio/tests/gdbus-sessionbus.c
+++ b/gio/tests/gdbus-sessionbus.c
@@ -165,7 +165,13 @@ session_bus_up_with_address (const gchar *given_address)
     }
   g_string_free (config_file_contents, TRUE);
 
-  argv[2] = g_strdup_printf ("--config-file=%s", config_file_name);
+  if (g_getenv ("G_DBUS_DAEMON") != NULL)
+    {
+      argv[0] = "./gdbus-daemon";
+      argv[2] = g_strdup_printf ("--address=%s", given_address);
+    }
+  else
+    argv[2] = g_strdup_printf ("--config-file=%s", config_file_name);
 
   if (session_bus_address_to_pid == NULL)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]