diff options
author | Stef Walter <stefw@gnome.org> | 2013-08-17 10:28:27 +0200 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-08-17 10:28:27 +0200 |
commit | b8ad18fd3c49f744c4f744eae241c18f8fb8a953 (patch) | |
tree | dbd0175e304290bc245b00daa342632ade39f8da | |
parent | 1533e463d4263d3b4ec65750fb2f2ac7203edf73 (diff) |
daemon: Fix running gnome-keyring-daemon under test harness
-rw-r--r-- | daemon/dbus/tests/test-service.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/daemon/dbus/tests/test-service.c b/daemon/dbus/tests/test-service.c index 82ef5237..8373f53d 100644 --- a/daemon/dbus/tests/test-service.c +++ b/daemon/dbus/tests/test-service.c @@ -63,14 +63,8 @@ on_test_service_vanished (GDBusConnection *connection, static void on_service_spawned (gpointer user_data) { - TestService *test = user_data; int fd; - g_setenv ("GNOME_KEYRING_TEST_PATH", test->directory, TRUE); - g_setenv ("GNOME_KEYRING_TEST_SERVICE", test->bus_name, TRUE); - if (test->mock_prompter) - g_setenv ("GNOME_KEYRING_TEST_PROMPTER", test->mock_prompter, TRUE); - fd = g_open ("/dev/null", O_WRONLY, 0); if (fd != -1) dup2 (fd, 1); @@ -109,6 +103,10 @@ test_service_setup (TestService *test) /* The schema directory */ env = g_get_environ (); env = g_environ_setenv (env, "GSETTINGS_SCHEMA_DIR", TOP_BUILDDIR "/schema", TRUE); + env = g_environ_setenv (env, "GNOME_KEYRING_TEST_PATH", test->directory, TRUE); + env = g_environ_setenv (env, "GNOME_KEYRING_TEST_SERVICE", test->bus_name, TRUE); + if (test->mock_prompter) + env = g_environ_setenv (env, "GNOME_KEYRING_TEST_PROMPTER", test->mock_prompter, TRUE); if (!g_spawn_async (NULL, args, env, G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_DO_NOT_REAP_CHILD, |