summaryrefslogtreecommitdiff
path: root/test/dbus-daemon.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-03-21 18:40:16 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-06-10 18:32:06 +0100
commitae5524d632c5cccb73f1f386b5c1d41b73861445 (patch)
treeee3b33d30692b975da0687b86ccce9b4c57980ec /test/dbus-daemon.c
parentba9c274f33eaa6c642a2e63f8191c483fcd941b9 (diff)
downloaddbus-ae5524d632c5cccb73f1f386b5c1d41b73861445.tar.gz
dbus-daemon test: sanity-check the just-installed config file when using DESTDIR
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570
Diffstat (limited to 'test/dbus-daemon.c')
-rw-r--r--test/dbus-daemon.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/dbus-daemon.c b/test/dbus-daemon.c
index 04955e03..d2d5246a 100644
--- a/test/dbus-daemon.c
+++ b/test/dbus-daemon.c
@@ -184,7 +184,17 @@ setup (Fixture *f,
if (g_getenv ("DBUS_TEST_USE_INSTALLED") != NULL)
{
- config = g_strdup ("--session");
+ /* we strdup this because it might be clobbered by a subsequent
+ * g_getenv */
+ gchar *destdir = g_strdup (g_getenv ("DESTDIR"));
+
+ if (destdir != NULL && *destdir != '\0')
+ config = g_strdup_printf ("--config-file=%s%s/dbus-1/session.conf",
+ destdir, g_getenv ("DBUS_TEST_SYSCONFDIR"));
+ else
+ config = g_strdup ("--session");
+
+ g_free (destdir);
}
else
{