From 1e5206eed3848d8014a225b5d8252c5c7aeb137e Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 8 Nov 2012 21:10:09 -0600 Subject: ensure that the service unit test can find all the GSettings schemas that it needs. --- tests/test-service.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/test-service.cc') diff --git a/tests/test-service.cc b/tests/test-service.cc index 2f82bb3..21967cb 100644 --- a/tests/test-service.cc +++ b/tests/test-service.cc @@ -46,14 +46,16 @@ class ClientTest : public ::testing::Test session_bus = NULL; main_loop = NULL; - static bool ran_once_init = false; - if (!ran_once_init) + static bool first_run = true; + if (first_run) { g_type_init(); g_setenv ("INDICATOR_SERVICE_SHUTDOWN_TIMEOUT", "1000", TRUE); g_unsetenv ("INDICATOR_ALLOW_NO_WATCHERS"); g_unsetenv ("INDICATOR_SERVICE_REPLACE_MODE"); - ran_once_init = true; + g_setenv ("GSETTINGS_SCHEMA_DIR", SCHEMA_DIR, TRUE); + g_setenv ("GSETTINGS_BACKEND", "memory", TRUE); + first_run = false; } main_loop = g_main_loop_new (NULL, FALSE); -- cgit v1.2.3