diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2012-11-08 21:10:09 -0600 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2012-11-08 21:10:09 -0600 |
commit | 1e5206eed3848d8014a225b5d8252c5c7aeb137e (patch) | |
tree | 2c603624b84a99d4a8b9ee36ee0d0b4ee94543c3 /tests/test-service.cc | |
parent | 696c57e3fce174d7a30d2dd32cdb299c1dd663c3 (diff) | |
download | ayatana-indicator-session-1e5206eed3848d8014a225b5d8252c5c7aeb137e.tar.gz ayatana-indicator-session-1e5206eed3848d8014a225b5d8252c5c7aeb137e.tar.bz2 ayatana-indicator-session-1e5206eed3848d8014a225b5d8252c5c7aeb137e.zip |
ensure that the service unit test can find all the GSettings schemas that it needs.
Diffstat (limited to 'tests/test-service.cc')
-rw-r--r-- | tests/test-service.cc | 8 |
1 files changed, 5 insertions, 3 deletions
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); |