[libgweather/wip/hadess/fix-utc-sunrise] run gsettings early



commit 38443ef90ba2a5e95410c1857f07648c6f7b9760
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Oct 8 15:56:23 2018 +0200

    run gsettings early

 libgweather/test_libgweather.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libgweather/test_libgweather.c b/libgweather/test_libgweather.c
index 9803611..d02360e 100644
--- a/libgweather/test_libgweather.c
+++ b/libgweather/test_libgweather.c
@@ -415,6 +415,11 @@ set_gsettings (void)
        g_assert (result == 0);
        g_free (cmdline);
 
+       cmdline = g_strdup_printf ("ls -l %s", tmpdir);
+       char *out;
+       g_spawn_command_line_sync (cmdline, &out, NULL, &result, NULL);
+       g_message ("out: %s", out);
+
        /* Set envvar */
        g_setenv ("GSETTINGS_SCHEMA_DIR", tmpdir, TRUE);
        g_setenv ("GSETTINGS_BACKEND", "memory", TRUE);
@@ -430,8 +435,6 @@ test_utc_sunset (void)
        GWeatherMoonLatitude lat;
        gboolean ret;
 
-       set_gsettings ();
-
        world = gweather_location_get_world ();
        g_assert_nonnull (world);
        utc = gweather_location_find_by_station_code (world, "@UTC");
@@ -600,6 +603,7 @@ main (int argc, char *argv[])
        g_setenv ("LIBGWEATHER_LOCATIONS_PATH",
                  TEST_SRCDIR "../data/Locations.xml",
                  FALSE);
+       set_gsettings ();
 
        g_test_add_func ("/weather/named-timezones", test_named_timezones);
        g_test_add_func ("/weather/named-timezones-deserialized", test_named_timezones_deserialized);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]