meson: gio/tests: add more gio tests

Need to fix up some of the tests a little, because the
test binary will not necessarily be run from the current
build sub-directory, and the build directory structure
might not always be a mirror of the source directory
structure, so pass location of glib-mkenums and
glib-compile-scheme and such directly.
This commit is contained in:
Tim-Philipp Müller
2017-02-24 09:46:36 +00:00
committed by Matthias Clasen
parent 1acd6de763
commit 613e00826e
6 changed files with 96 additions and 11 deletions

View File

@@ -11,6 +11,11 @@ typedef struct {
const gchar *err;
} SchemaTest;
/* Meson build defines this, autotools build does not */
#ifndef GLIB_COMPILE_SCHEMAS
#define GLIB_COMPILE_SCHEMAS "../glib-compile-schemas"
#endif
static void
test_schema_do_compile (gpointer data)
{
@@ -18,7 +23,7 @@ test_schema_do_compile (gpointer data)
gchar *filename = g_strconcat (test->name, ".gschema.xml", NULL);
gchar *path = g_test_build_filename (G_TEST_DIST, "schema-tests", filename, NULL);
gchar *argv[] = {
"../glib-compile-schemas",
GLIB_COMPILE_SCHEMAS,
"--strict",
"--dry-run",
"--schema-file", path,