Commit 8e48532d authored by Simon McVittie's avatar Simon McVittie

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's avatarSimon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101698
parent 68304a47
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment