telepathy-glib: Tests: use g_test_dbus_unset()

Xavier Claessens xclaesse at kemper.freedesktop.org
Fri Nov 15 12:16:20 PST 2013


Module: telepathy-glib
Branch: master
Commit: 8313306834c7f294596820919a5ed52197a574be
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=8313306834c7f294596820919a5ed52197a574be

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Mon Oct 28 14:59:57 2013 -0400

Tests: use g_test_dbus_unset()

Also link to https://bugzilla.gnome.org/show_bug.cgi?id=697348 to
explain why we still have to unset STARTER env variables.

---

 tests/lib/util.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/lib/util.c b/tests/lib/util.c
index 3cf47e1..6dd6dd4 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -86,12 +86,12 @@ start_dbus_session (void)
 
   g_type_init ();
 
-  /* Make sure we won't be using user's bus. This unsets more than
-   * g_test_dbus_unset() currently does (glib 2.36) */
-  g_unsetenv ("DISPLAY");
+  g_test_dbus_unset ();
+
+  /* GLib 2.36 does not unset STARTER env variables but tp-glib are using them.
+   * See https://bugzilla.gnome.org/show_bug.cgi?id=697348 */
   g_unsetenv ("DBUS_STARTER_ADDRESS");
   g_unsetenv ("DBUS_STARTER_BUS_TYPE");
-  g_unsetenv ("DBUS_SESSION_BUS_ADDRESS");
 
   test_dbus = g_test_dbus_new (G_TEST_DBUS_NONE);
   g_test_dbus_add_service_dir (test_dbus, g_getenv ("TP_TESTS_SERVICES_DIR"));



More information about the telepathy-commits mailing list