summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Bicha <jbicha@ubuntu.com>2021-09-20 21:02:23 -0400
committerJeremy Bicha <jbicha@ubuntu.com>2021-09-20 22:33:29 -0400
commit0a099845846ebde2d752a53f26ee3f00754cd3a9 (patch)
tree6e58ec511eab26f228e25ea96d6d0c94dde00311
parent7951ad389735d77f9faf74ebaebd691ba9285202 (diff)
downloadcheese-0a099845846ebde2d752a53f26ee3f00754cd3a9.tar.gz
tests: Compile gsettings schemas for use in build tests
Closes: https://bugzilla.gnome.org/show_bug.cgi?id=731009
-rw-r--r--data/meson.build2
-rw-r--r--src/meson.build27
-rw-r--r--tests/meson.build3
3 files changed, 20 insertions, 12 deletions
diff --git a/data/meson.build b/data/meson.build
index 34e669da..a355fdec 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -51,6 +51,8 @@ configure_file(
install_dir: dbus_session_bus_services_dir,
)
+compile_schemas = gnome.compile_schemas()
+
install_data(
cheese_namespace + '.gschema.xml',
install_dir: gio_schemasdir,
diff --git a/src/meson.build b/src/meson.build
index 74f62b16..cf96950a 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,15 +1,18 @@
-sources = files(
- 'cheese-application.vala',
- 'cheese-countdown.vala',
- 'cheese-effects-manager.vala',
- 'cheese-main.vala',
- 'cheese-preferences.vala',
- 'cheese-window.vala',
- 'thumbview/cheese-thumbnail.c',
- 'thumbview/cheese-thumb-view.c',
- 'thumbview/eog-thumb-nav.c',
- 'vapi/libcanberra-gtk3.vapi'
-)
+sources = [
+ files(
+ 'cheese-application.vala',
+ 'cheese-countdown.vala',
+ 'cheese-effects-manager.vala',
+ 'cheese-main.vala',
+ 'cheese-preferences.vala',
+ 'cheese-window.vala',
+ 'thumbview/cheese-thumbnail.c',
+ 'thumbview/cheese-thumb-view.c',
+ 'thumbview/eog-thumb-nav.c',
+ 'vapi/libcanberra-gtk3.vapi'
+ ),
+ compile_schemas
+]
deps = [
cheese_common_dep,
diff --git a/tests/meson.build b/tests/meson.build
index d7167471..024da8d3 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -20,6 +20,9 @@ random_number = cheese_minor_version + meson.version().split('.').get(1).to_int(
test_env = environment()
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+test_env.set('GSETTINGS_SCHEMA_DIR', join_paths(meson.build_root(), 'data'))
+test_env.set('GSETTINGS_BACKEND', 'memory')
+
test_env.set('G_DEBUG', 'gc-friendly')
test_env.set('MALLOC_CHECK_', '2')
test_env.set('MALLOC_PERTURB_', '@0@'.format(random_number % 256))