mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
tests: use new g_test_build_filename() API
Port most of the tests to the new g_test_build_filename() API. https://bugzilla.gnome.org/show_bug.cgi?id=549783
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
#include <gio/gio.h>
|
||||
#include <gstdio.h>
|
||||
|
||||
const gchar *datapath;
|
||||
const gchar *glib_compile_schemas;
|
||||
|
||||
typedef struct {
|
||||
@@ -19,7 +18,7 @@ test_schema_do_compile (gpointer data)
|
||||
{
|
||||
SchemaTest *test = (SchemaTest *) data;
|
||||
gchar *filename = g_strconcat (test->name, ".gschema.xml", NULL);
|
||||
gchar *path = g_build_filename (datapath, "schema-tests", filename, NULL);
|
||||
gchar *path = g_test_build_filename (G_TEST_DISTED, "schema-tests", filename, NULL);
|
||||
gchar *argv[] = {
|
||||
(gchar*)glib_compile_schemas,
|
||||
"--strict",
|
||||
@@ -142,11 +141,6 @@ main (int argc, char *argv[])
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
if (g_getenv ("G_TEST_DATA"))
|
||||
datapath = g_getenv ("G_TEST_DATA");
|
||||
else
|
||||
datapath = SRCDIR;
|
||||
|
||||
if (g_getenv ("GLIB_COMPILE_SCHEMAS"))
|
||||
glib_compile_schemas = g_getenv ("GLIB_COMPILE_SCHEMAS");
|
||||
else
|
||||
|
Reference in New Issue
Block a user