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:
Ryan Lortie
2013-05-28 12:48:37 -04:00
parent 0c4806733c
commit 58c6ca32aa
19 changed files with 62 additions and 200 deletions

View File

@@ -62,8 +62,6 @@ static gboolean is_unix = TRUE;
static gboolean is_unix = FALSE;
#endif
static const gchar *datapath;
static gchar *tmp_address = NULL;
static gchar *test_guid = NULL;
static GMutex service_loop_lock;
@@ -789,7 +787,7 @@ test_peer (void)
gsize len;
gchar *buf2;
gsize len2;
char *testfile = g_build_filename (datapath, "file.c", NULL);
char *testfile = g_test_build_filename (G_TEST_DISTED, "file.c", NULL);
method_call_message = g_dbus_message_new_method_call (NULL, /* name */
"/org/gtk/GDBus/PeerTestObject",
@@ -1847,11 +1845,6 @@ main (int argc,
GDBusNodeInfo *introspection_data = NULL;
gchar *tmpdir = NULL;
if (g_getenv ("G_TEST_DATA"))
datapath = g_getenv ("G_TEST_DATA");
else
datapath = SRCDIR;
g_test_init (&argc, &argv, NULL);
introspection_data = g_dbus_node_info_new_for_xml (test_interface_introspection_xml, NULL);