mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Convert remaining gio tests to installed
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user