summaryrefslogtreecommitdiff
path: root/test/dbus-daemon-eavesdrop.c
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2014-10-01 19:45:00 +0100
committerSimon McVittie <smcv@debian.org>2014-10-01 19:45:00 +0100
commit255f62947424c4622609eb93ed53371dda28aac9 (patch)
tree6f8c5dbb96e48fa2d40919bb3282fae0b6d953de /test/dbus-daemon-eavesdrop.c
parentc03b8e681afa8e45977fc74e30142497939b47d1 (diff)
parent33ee25f98af863e9355fd53b9184c0b798343b89 (diff)
downloaddbus-upstream/1.9.0.tar.gz
Imported Upstream version 1.9.0upstream/1.9.0
Diffstat (limited to 'test/dbus-daemon-eavesdrop.c')
-rw-r--r--test/dbus-daemon-eavesdrop.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/dbus-daemon-eavesdrop.c b/test/dbus-daemon-eavesdrop.c
index 2c45f54e..a78d8888 100644
--- a/test/dbus-daemon-eavesdrop.c
+++ b/test/dbus-daemon-eavesdrop.c
@@ -151,6 +151,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;
}
@@ -409,7 +411,14 @@ setup (Fixture *f,
config = g_strdup ("--session");
}
- address = spawn_dbus_daemon (dbus_daemon, config, &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, config, &f->daemon_pid);
+ }
g_free (dbus_daemon);
g_free (config);