Fix GSettings testcase again

Hopefully this one will work for both srcdir == builddir and not.
This commit is contained in:
Ryan Lortie 2013-11-15 15:23:43 -05:00
parent cb889d9580
commit ca830f2733
3 changed files with 6 additions and 3 deletions

View File

@ -318,7 +318,7 @@ test.mo: de.po
cp -f test.mo de/LC_MESSAGES cp -f test.mo de/LC_MESSAGES
EXTRA_DIST += de.po EXTRA_DIST += de.po
dist_uninstalled_test_data += \ dist_uninstalled_test_data += \
org.gtk.test.gschema.xml \ org.gtk.test.gschema.xml.orig \
org.gtk.schemasourcecheck.gschema.xml \ org.gtk.schemasourcecheck.gschema.xml \
testenum.h \ testenum.h \
enums.xml.template enums.xml.template

View File

@ -2412,11 +2412,14 @@ main (int argc, char *argv[])
g_assert (g_file_set_contents ("org.gtk.test.enums.xml", enums, -1, NULL)); g_assert (g_file_set_contents ("org.gtk.test.enums.xml", enums, -1, NULL));
g_free (enums); g_free (enums);
g_assert (g_file_get_contents (SRCDIR "/org.gtk.test.gschema.xml", &schema_text, NULL, NULL)); g_assert (g_file_get_contents (SRCDIR "/org.gtk.test.gschema.xml.orig", &schema_text, NULL, NULL));
g_assert (g_file_set_contents ("org.gtk.test.gschema.xml", schema_text, -1, NULL)); g_assert (g_file_set_contents ("org.gtk.test.gschema.xml", schema_text, -1, NULL));
g_remove ("gschemas.compiled"); g_remove ("gschemas.compiled");
g_assert (g_spawn_command_line_sync ("../glib-compile-schemas .", NULL, NULL, &result, NULL)); g_assert (g_spawn_command_line_sync ("../glib-compile-schemas --targetdir=. "
"--schema-file=org.gtk.test.enums.xml "
"--schema-file=org.gtk.test.gschema.xml",
NULL, NULL, &result, NULL));
g_assert (result == 0); g_assert (result == 0);
g_remove ("schema-source/gschemas.compiled"); g_remove ("schema-source/gschemas.compiled");