summaryrefslogtreecommitdiff
path: root/gdata/tests/freebase.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2015-05-06 00:21:17 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2015-05-06 00:21:17 +0100
commit10f67845a07c75bf92f1128d949edae75d645ec7 (patch)
treee1f1ee8f37a5f50cec1cbc095b2007716020068b /gdata/tests/freebase.c
parent0e42b9d0e64aaf9f4d04eeab29d860a68209ff61 (diff)
downloadlibgdata-10f67845a07c75bf92f1128d949edae75d645ec7.tar.gz
tests: Use g_test_build_filename() to load test data files
Rather than TEST_FILE_DIR, which is completely non-relocatable and a bit of a hack. This is one step towards supporting installed-tests. https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
Diffstat (limited to 'gdata/tests/freebase.c')
-rw-r--r--gdata/tests/freebase.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdata/tests/freebase.c b/gdata/tests/freebase.c
index ab2a1b9d..d5065f8c 100644
--- a/gdata/tests/freebase.c
+++ b/gdata/tests/freebase.c
@@ -396,13 +396,16 @@ main (int argc, char *argv[])
{
GFile *trace_directory;
gint retval;
+ gchar *path = NULL;
gdata_test_init (argc, argv);
mock_server = gdata_test_get_mock_server ();
g_signal_connect (G_OBJECT (mock_server), "notify::resolver",
(GCallback) mock_server_notify_resolver_cb, NULL);
- trace_directory = g_file_new_for_path (TEST_FILE_DIR "traces/freebase");
+ path = g_test_build_filename (G_TEST_DIST, "traces/freebase", NULL);
+ trace_directory = g_file_new_for_path (path);
+ g_free (path);
uhm_server_set_trace_directory (mock_server, trace_directory);
g_object_unref (trace_directory);