gio/tests: add a fake implementation of the document portal

This commit is contained in:
James Henstridge
2019-09-16 14:04:30 +02:00
parent 457d4c9fe0
commit 27db702ceb
6 changed files with 209 additions and 6 deletions

View File

@@ -15,16 +15,20 @@ static void
fixture_setup (TestFixture *fixture, gconstpointer unused)
{
GError *error = NULL;
gchar *relative, *servicesdir;
/* Create the global dbus-daemon for this test suite
*/
fixture->dbus = g_test_dbus_new (G_TEST_DBUS_NONE);
/* Add the private directory with our in-tree service files,
* TEST_SERVICES is defined by the build system to point
* to the right directory.
/* Add the private directory with our in-tree service files.
*/
g_test_dbus_add_service_dir (fixture->dbus, TEST_SERVICES);
relative = g_test_build_filename (G_TEST_BUILT, "services", NULL);
servicesdir = g_canonicalize_filename (relative, NULL);
g_free (relative);
g_test_dbus_add_service_dir (fixture->dbus, servicesdir);
g_free (servicesdir);
/* Start the private D-Bus daemon
*/