diff options
author | Alexander Larsson <alexl@redhat.com> | 2015-09-08 09:48:14 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2015-09-08 09:49:33 +0200 |
commit | 18cc81d8a7893c7348b7d6bd728852749423f720 (patch) | |
tree | 36cafc8e9bf2c34394aa3618fbf3e19aa409241f /tests | |
parent | 44f295c08848bdca346d80a5e027f26ca93d3fbc (diff) | |
download | xdg-app-18cc81d8a7893c7348b7d6bd728852749423f720.tar.gz |
test-doc-portal: Launch the portal manually
This allows us to get debug output
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am.inc | 2 | ||||
-rw-r--r-- | tests/test-doc-portal.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/Makefile.am.inc b/tests/Makefile.am.inc index 5102c09..72d563a 100644 --- a/tests/Makefile.am.inc +++ b/tests/Makefile.am.inc @@ -8,7 +8,7 @@ testdb_LDADD = \ $(NULL) testdb_SOURCES = tests/testdb.c -test_doc_portal_CFLAGS = $(BASE_CFLAGS) -DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\" +test_doc_portal_CFLAGS = $(BASE_CFLAGS) -DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\" -DDOC_PORTAL=\""$(abs_top_builddir)/xdg-document-portal"\" test_doc_portal_LDADD = \ $(BASE_LIBS) \ $(OSTREE_LIBS) \ diff --git a/tests/test-doc-portal.c b/tests/test-doc-portal.c index 2add54f..60e9648 100644 --- a/tests/test-doc-portal.c +++ b/tests/test-doc-portal.c @@ -189,6 +189,7 @@ main (int argc, char **argv) int res; gboolean inited; GError *error = NULL; + gint exit_status; g_mkdtemp (outdir); g_print ("outdir: %s\n", outdir); @@ -200,6 +201,10 @@ main (int argc, char **argv) g_test_dbus_add_service_dir (dbus, TEST_SERVICES); g_test_dbus_up (dbus); + g_spawn_command_line_sync (DOC_PORTAL " -d", NULL, NULL, &exit_status, &error); + g_assert_cmpint (exit_status, ==, 0); + g_assert_no_error (error); + session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); g_assert_no_error (error); |