Convert remaining gio tests to installed

This commit is contained in:
Matthias Clasen
2013-05-20 08:46:21 -04:00
parent 5e1f9173c3
commit 142d78214d
9 changed files with 194 additions and 43 deletions

View File

@@ -26,6 +26,8 @@
#include "gdbus-tests.h"
static const gchar *datapath;
/* all tests rely on a global connection */
static GDBusConnection *c = NULL;
@@ -112,6 +114,12 @@ main (int argc,
{
GError *error;
gint ret;
gchar *path;
if (g_getenv ("G_TEST_DATA"))
datapath = g_getenv ("G_TEST_DATA");
else
datapath = SRCDIR;
g_test_init (&argc, &argv, NULL);
@@ -121,7 +129,9 @@ main (int argc,
session_bus_up ();
/* this is safe; testserver will exit once the bus goes away */
g_assert (g_spawn_command_line_async ("./gdbus-testserver", NULL));
path = g_build_filename (datapath, "gdbus-testserver", NULL);
g_assert (g_spawn_command_line_async (path, NULL));
g_free (path);
/* wait for the service to come up */
usleep (500 * 1000);