diff options
author | Christoph Reiter <creiter@src.gnome.org> | 2018-02-15 11:44:04 +0100 |
---|---|---|
committer | Christoph Reiter <creiter@src.gnome.org> | 2018-02-15 12:30:57 +0100 |
commit | c60ea284c5ce485977f7fd924e8542c613694ad4 (patch) | |
tree | 9c701cf15cc4529c6df8d4791cf2510cbb7c5a42 /testsuite | |
parent | 238239c00d5346fb81cccb1cbd4af38d2da8a130 (diff) | |
download | gtk+-c60ea284c5ce485977f7fd924e8542c613694ad4.tar.gz |
testsuite/a11y: Fix missing glib schemas
The a11y tests complain that org.gtk.Settings schemas are missing
and fail. This copies the code to build and include the schemas from
the reftests testsuite.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/a11y/Makefile.am | 16 | ||||
-rw-r--r-- | testsuite/a11y/accessibility-dump.c | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/a11y/Makefile.am b/testsuite/a11y/Makefile.am index 9fd1fc054d..c51e55eec3 100644 --- a/testsuite/a11y/Makefile.am +++ b/testsuite/a11y/Makefile.am @@ -101,6 +101,22 @@ test_in_files = \ EXTRA_DIST += $(test_in_files) $(testdata) +GTK_GSETTINGS_SCHEMAS = \ + $(top_srcdir)/gtk/org.gtk.Settings.ColorChooser.gschema.xml \ + $(top_srcdir)/gtk/org.gtk.Settings.FileChooser.gschema.xml \ + $(NULL) + +gschemas.compiled: $(GTK_GSETTINGS_SCHEMAS) + $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) \ + $(addprefix --schema-file=,$(GTK_GSETTINGS_SCHEMAS)) \ + --targetdir=$(builddir) + +BUILT_SOURCES = gschemas.compiled + +CLEANFILES = gschemas.compiled + +all-am: gschemas.compiled + if BUILDOPT_INSTALL_TESTS insttestdir=$(libexecdir)/installed-tests/$(PACKAGE) insttest_PROGRAMS = $(TEST_PROGS) diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c index eb90477ad0..779bf801b7 100644 --- a/testsuite/a11y/accessibility-dump.c +++ b/testsuite/a11y/accessibility-dump.c @@ -858,6 +858,7 @@ parse_command_line (int *argc, char ***argv) { GError *error = NULL; GOptionContext *context; + gchar *schema_dir; context = g_option_context_new ("- run GTK accessibility tests"); g_option_context_add_main_entries (context, test_args, NULL); @@ -871,6 +872,10 @@ parse_command_line (int *argc, char ***argv) gtk_test_init (argc, argv); + schema_dir = g_test_build_filename (G_TEST_BUILT, "", NULL); + g_setenv ("GSETTINGS_SCHEMA_DIR", schema_dir, TRUE); + g_free (schema_dir); + /* gtk_test_init does not call setlocale(), so do it ourselves, * since running in the C locale breaks some our fancy * utf8 output. |