summaryrefslogtreecommitdiff
path: root/test/dbus-daemon.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2017-07-05 15:30:05 +0100
committerSimon McVittie <smcv@collabora.com>2017-07-07 10:54:01 +0100
commit8e48532d242c8f7529960b2bbee85e11179cfb56 (patch)
treefa2463ed0d74b76ed02d59cd590a0b76bc3f1a58 /test/dbus-daemon.c
parent68304a47c04898987cbc53a3b8729e2511aad6f0 (diff)
downloaddbus-8e48532d242c8f7529960b2bbee85e11179cfb56.tar.gz
test/dbus-daemon: Unset DBUS_SESSION_BUS_ADDRESS
When we intend to exercise the default behaviour in the absence of DBUS_SESSION_BUS_ADDRESS (but with an XDG_RUNTIME_DIR present), it would help if we unset DBUS_SESSION_BUS_ADDRESS. Otherwise we'll just connect to the real session bus, if there is one. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101698
Diffstat (limited to 'test/dbus-daemon.c')
-rw-r--r--test/dbus-daemon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c
index 99d2bc63..d940f431 100644
--- a/test/dbus-daemon.c
+++ b/test/dbus-daemon.c
@@ -147,6 +147,7 @@ setup (Fixture *f,
/* we're relying on being single-threaded for this to be safe */
f->saved_runtime_dir = g_strdup (g_getenv ("XDG_RUNTIME_DIR"));
g_setenv ("XDG_RUNTIME_DIR", f->tmp_runtime_dir, TRUE);
+ g_unsetenv ("DBUS_SESSION_BUS_ADDRESS");
}
address = test_get_dbus_daemon (config ? config->config_file : NULL,