diff options
author | Bastien Nocera <hadess@hadess.net> | 2017-12-07 15:40:06 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2017-12-07 15:40:06 +0100 |
commit | 3cd7b21ceb42eeb860819ceafa558c06cd900906 (patch) | |
tree | 5895b04667fa63ef402f7309f4a91d32da9a192d /libgweather | |
parent | 27c07fda5f775a3dd9c9019a7f94db5324051de2 (diff) | |
download | libgweather-3cd7b21ceb42eeb860819ceafa558c06cd900906.tar.gz |
tests: Use uninstalled Locations.xml for other tests
Diffstat (limited to 'libgweather')
-rw-r--r-- | libgweather/meson.build | 5 | ||||
-rw-r--r-- | libgweather/test_locations.c | 4 | ||||
-rw-r--r-- | libgweather/test_locations_utc.c | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/libgweather/meson.build b/libgweather/meson.build index 4f8b3d2..847fd1a 100644 --- a/libgweather/meson.build +++ b/libgweather/meson.build @@ -95,16 +95,19 @@ if enable_vala ) endif +test_cargs = ['-DTEST_SRCDIR="@0@/"'.format(meson.current_source_dir())] + executable('test_locations', ['test_locations.c'], + c_args: test_cargs, dependencies: libgweather_dep, install: false) executable('test_locations_utc', ['test_locations_utc.c'], + c_args: test_cargs, dependencies: libgweather_dep, install: false) -test_cargs = ['-DTEST_SRCDIR="@0@/"'.format(meson.current_source_dir())] exe = executable('test_libgweather', ['test_libgweather.c'], c_args: test_cargs, diff --git a/libgweather/test_locations.c b/libgweather/test_locations.c index fcb39f9..b03375e 100644 --- a/libgweather/test_locations.c +++ b/libgweather/test_locations.c @@ -37,6 +37,10 @@ main (int argc, char **argv) GtkWidget *combo; gtk_init (&argc, &argv); + g_setenv ("LIBGWEATHER_LOCATIONS_PATH", + TEST_SRCDIR "../data/Locations.xml", + FALSE); + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "location"); gtk_container_set_border_width (GTK_CONTAINER (window), 8); diff --git a/libgweather/test_locations_utc.c b/libgweather/test_locations_utc.c index a071318..3c599af 100644 --- a/libgweather/test_locations_utc.c +++ b/libgweather/test_locations_utc.c @@ -38,6 +38,10 @@ main (int argc, char **argv) gtk_init (&argc, &argv); + g_setenv ("LIBGWEATHER_LOCATIONS_PATH", + TEST_SRCDIR "../data/Locations.xml", + FALSE); + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), "location"); gtk_container_set_border_width (GTK_CONTAINER (window), 8); |