summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-05-17 09:27:57 +0100
committerAlexander Larsson <alexl@redhat.com>2016-05-17 17:59:04 +0200
commit48286324569a1d11b1f0c059b14177ff5918c392 (patch)
treeb421ca9f4435b8423b3d2fc722ae99a2356d4d80
parent513f795c6593ba2009b12e8e6031360d4154aa4f (diff)
downloadxdg-app-48286324569a1d11b1f0c059b14177ff5918c392.tar.gz
test-doc-portal: rely on G_TEST_BUILDDIR to find services
Signed-off-by: Simon McVittie <smcv@debian.org>
-rw-r--r--tests/Makefile.am.inc2
-rw-r--r--tests/test-doc-portal.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/Makefile.am.inc b/tests/Makefile.am.inc
index 9fe5682..6e58d49 100644
--- a/tests/Makefile.am.inc
+++ b/tests/Makefile.am.inc
@@ -16,7 +16,7 @@ testdb_LDADD = \
$(NULL)
testdb_SOURCES = tests/testdb.c
-test_doc_portal_CFLAGS = $(BASE_CFLAGS) -DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\" -DDOC_PORTAL=\""$(abs_top_builddir)/xdg-document-portal"\"
+test_doc_portal_CFLAGS = $(BASE_CFLAGS)
test_doc_portal_LDADD = \
$(BASE_LIBS) \
$(OSTREE_LIBS) \
diff --git a/tests/test-doc-portal.c b/tests/test-doc-portal.c
index 24ab7fa..8ca2164 100644
--- a/tests/test-doc-portal.c
+++ b/tests/test-doc-portal.c
@@ -335,6 +335,7 @@ global_setup (void)
g_autofree gchar *fusermount = NULL;
GError *error = NULL;
gint exit_status;
+ g_autofree gchar *services = NULL;
fusermount = g_find_program_in_path ("fusermount");
/* cache result so subsequent tests can be marked as skipped */
@@ -352,7 +353,8 @@ global_setup (void)
g_setenv ("XDG_DATA_HOME", outdir, TRUE);
dbus = g_test_dbus_new (G_TEST_DBUS_NONE);
- g_test_dbus_add_service_dir (dbus, TEST_SERVICES);
+ services = g_test_build_filename (G_TEST_BUILT, "services", NULL);
+ g_test_dbus_add_service_dir (dbus, services);
g_test_dbus_up (dbus);
/* g_test_dbus_up unsets this, so re-set */