summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-06-18 14:19:48 +0200
committerStef Walter <stefw@gnome.org>2013-06-18 14:19:48 +0200
commit99b6f5aa5bf2d216fa4ad47a94cde21f87f1af38 (patch)
tree0ff45722519d15c875c43c17a0442cf0ab13e1d8 /daemon
parent8b3f300761edbb1ef9fcf434ccc3150ca3a1eef9 (diff)
daemon: Fix running tests without installed gnome-keyring
https://bugzilla.gnome.org/show_bug.cgi?id=702367
Diffstat (limited to 'daemon')
-rw-r--r--daemon/dbus/tests/test-service.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/daemon/dbus/tests/test-service.c b/daemon/dbus/tests/test-service.c
index 98c545f5..82ef5237 100644
--- a/daemon/dbus/tests/test-service.c
+++ b/daemon/dbus/tests/test-service.c
@@ -82,6 +82,7 @@ test_service_setup (TestService *test)
GError *error = NULL;
GVariant *retval;
GVariant *output;
+ gchar **env;
gchar *args[] = {
TOP_BUILDDIR "/daemon/gnome-keyring-daemon",
@@ -105,13 +106,19 @@ test_service_setup (TestService *test)
SRCDIR "/files/test.keyring",
NULL);
- if (!g_spawn_async (NULL, args, NULL,
+ /* The schema directory */
+ env = g_get_environ ();
+ env = g_environ_setenv (env, "GSETTINGS_SCHEMA_DIR", TOP_BUILDDIR "/schema", TRUE);
+
+ if (!g_spawn_async (NULL, args, env,
G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_DO_NOT_REAP_CHILD,
on_service_spawned, test, &test->pid, &error)) {
g_error ("couldn't start gnome-keyring-daemon for testing: %s", error->message);
g_assert_not_reached ();
}
+ g_strfreev (env);
+
if (!test->available) {
egg_test_wait ();