mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-03 07:53:39 +02:00
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:
committed by
Matthias Clasen
parent
1acd6de763
commit
613e00826e
@@ -2,6 +2,7 @@
|
||||
#include <locale.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <glib/gstdio.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gio/gdesktopappinfo.h>
|
||||
|
||||
@@ -474,10 +475,18 @@ test_from_keyfile (void)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
const gchar *build_dir;
|
||||
|
||||
g_setenv ("XDG_CURRENT_DESKTOP", "GNOME", TRUE);
|
||||
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
/* 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_add_func ("/appinfo/basic", test_basic);
|
||||
g_test_add_func ("/appinfo/text", test_text);
|
||||
g_test_add_func ("/appinfo/launch", test_launch);
|
||||
|
Reference in New Issue
Block a user