summaryrefslogtreecommitdiff
path: root/test/name-test
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2018-10-24 12:03:14 +0200
committerSimon McVittie <smcv@collabora.com>2018-12-05 10:55:28 +0000
commit83bdfea8a93ef7eef582409a7eea63275458408f (patch)
tree90adefbbc56acb2fe3f86fef41e339a6d6375ad8 /test/name-test
parentc1e39d414f108a301f869c1328d044dd217fd9a1 (diff)
downloaddbus-83bdfea8a93ef7eef582409a7eea63275458408f.tar.gz
Fix test-shutdown bail out on Windows
test-shutdown expects a GUID in the bus address by default, which is not available under Windows, because on this platform an autolaunch address is provided by dbus-run-session and is not returned by dbus-daemon. Bug: https://gitlab.freedesktop.org/dbus/dbus/merge_requests/59 Reviewed-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'test/name-test')
-rw-r--r--test/name-test/test-shutdown.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/name-test/test-shutdown.c b/test/name-test/test-shutdown.c
index b195bbb7..26b61008 100644
--- a/test/name-test/test-shutdown.c
+++ b/test/name-test/test-shutdown.c
@@ -21,15 +21,19 @@ open_destroy_shared_session_bus_connection (void)
DBusConnection *connection;
char *session_addr_no_guid;
char *comma;
-
+
dbus_error_init (&error);
session_addr_no_guid = strdup (getenv ("DBUS_SESSION_BUS_ADDRESS"));
comma = strchr (session_addr_no_guid, ',');
- if (comma == NULL)
- die ("Couldn't find GUID in session bus address");
+
+#ifdef DBUS_WIN
+ _dbus_assert (comma == NULL);
+#else
+ _dbus_assert (comma != NULL);
*comma = '\0';
-
+#endif
+
connection = dbus_connection_open (session_addr_no_guid, &error);
free (session_addr_no_guid);
if (connection == NULL)