diff options
author | Simon McVittie <smcv@debian.org> | 2014-10-01 19:45:00 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2014-10-01 19:45:00 +0100 |
commit | 255f62947424c4622609eb93ed53371dda28aac9 (patch) | |
tree | 6f8c5dbb96e48fa2d40919bb3282fae0b6d953de /test/dbus-daemon.c | |
parent | c03b8e681afa8e45977fc74e30142497939b47d1 (diff) | |
parent | 33ee25f98af863e9355fd53b9184c0b798343b89 (diff) | |
download | dbus-upstream/1.9.0.tar.gz |
Imported Upstream version 1.9.0upstream/1.9.0
Diffstat (limited to 'test/dbus-daemon.c')
-rw-r--r-- | test/dbus-daemon.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c index 22ea23e3..4b3b61e5 100644 --- a/test/dbus-daemon.c +++ b/test/dbus-daemon.c @@ -119,6 +119,8 @@ spawn_dbus_daemon (gchar *binary, if (newline != NULL) { + if ((newline > address->str) && ('\r' == newline[-1])) + newline -= 1; g_string_truncate (address, newline - address->str); break; } @@ -194,6 +196,14 @@ setup (Fixture *f, if (config != NULL && config->config_file != NULL) { + if (g_getenv ("DBUS_TEST_DAEMON_ADDRESS") != NULL) + { + g_message ("SKIP: cannot use DBUS_TEST_DAEMON_ADDRESS for " + "unusally-configured dbus-daemon"); + f->skip = TRUE; + return; + } + if (g_getenv ("DBUS_TEST_DATA") == NULL) { g_message ("SKIP: set DBUS_TEST_DATA to a directory containing %s", @@ -227,7 +237,14 @@ setup (Fixture *f, if (dbus_daemon == NULL) dbus_daemon = g_strdup ("dbus-daemon"); - address = spawn_dbus_daemon (dbus_daemon, arg, &f->daemon_pid); + if (g_getenv ("DBUS_TEST_DAEMON_ADDRESS") != NULL) + { + address = g_strdup (g_getenv ("DBUS_TEST_DAEMON_ADDRESS")); + } + else + { + address = spawn_dbus_daemon (dbus_daemon, arg, &f->daemon_pid); + } g_free (dbus_daemon); g_free (arg); |