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

@@ -18,6 +18,7 @@
*/
#include <glib/glib.h>
#include <glib/gstdio.h>
#include <gio/gio.h>
#include <gio/gdesktopappinfo.h>
#include <stdlib.h>
@@ -759,8 +760,15 @@ int
main (int argc,
char *argv[])
{
const gchar *build_dir;
gint result;
/* With Meson build we need to change into right directory, so that the
* appinfo-test binary can be found. */
build_dir = g_getenv ("G_TEST_BUILDDIR");
if (build_dir)
g_chdir (build_dir);
g_test_init (&argc, &argv, NULL);
basedir = g_get_current_dir ();