From cd08ed52e15409e1927a2aaa31a07dfd9a1ee5a5 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 26 Jan 2017 22:41:10 +0100 Subject: [PATCH] Propagate DBUS_VERBOSE settings from test-auth to spawned dbus-daemon. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99512 --- test/test-utils-glib.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/test-utils-glib.c b/test/test-utils-glib.c index e6a2965..f7d60eb 100644 --- a/test/test-utils-glib.c +++ b/test/test-utils-glib.c @@ -104,6 +104,10 @@ spawn_dbus_daemon (const gchar *binary, #ifdef DBUS_UNIX const struct passwd *pwd = NULL; #endif + char *envp[2] = { "DBUS_VERBOSE=1", NULL }; + + if (!g_getenv ("DBUS_VERBOSE") || *g_getenv ("DBUS_VERBOSE") == '0') + envp[0] = NULL; if (user != TEST_USER_ME) { @@ -175,7 +179,7 @@ spawn_dbus_daemon (const gchar *binary, g_spawn_async_with_pipes (NULL, /* working directory */ (gchar **) argv->pdata, - NULL, /* envp */ + envp, /* envp */ G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, #ifdef DBUS_UNIX child_setup, (gpointer) pwd, -- 2.6.6