mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 07:26:15 +01:00
gio/tests: Fix gdbus-connection when run from "make check"
This commit is contained in:
parent
7ff5c08221
commit
bb1a5ca9a8
@ -136,6 +136,7 @@ other_progs = \
|
||||
gdbus-testserver \
|
||||
gdbus-connection-flush-helper \
|
||||
$(NULL)
|
||||
noinst_PROGRAMS += $(other_progs)
|
||||
|
||||
if OS_UNIX
|
||||
test_progs += \
|
||||
|
@ -28,7 +28,8 @@
|
||||
|
||||
#include "gdbus-tests.h"
|
||||
|
||||
const gchar *datapath;
|
||||
const gchar *srcdir;
|
||||
const gchar *builddir;
|
||||
|
||||
/* all tests rely on a shared mainloop */
|
||||
static GMainLoop *loop = NULL;
|
||||
@ -1004,7 +1005,7 @@ test_connection_filter (void)
|
||||
g_assert_cmpint (data.num_outgoing, ==, 4);
|
||||
|
||||
/* this is safe; testserver will exit once the bus goes away */
|
||||
path = g_build_filename (datapath, "gdbus-testserver", NULL);
|
||||
path = g_build_filename (builddir, "gdbus-testserver", NULL);
|
||||
g_assert (g_spawn_command_line_async (path, NULL));
|
||||
g_free (path);
|
||||
|
||||
@ -1228,9 +1229,12 @@ main (int argc,
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
|
||||
if (g_getenv ("G_TEST_DATA"))
|
||||
datapath = g_getenv ("G_TEST_DATA");
|
||||
srcdir = builddir = g_getenv ("G_TEST_DATA");
|
||||
else
|
||||
datapath = SRCDIR;
|
||||
{
|
||||
srcdir = SRCDIR;
|
||||
builddir = ".";
|
||||
}
|
||||
|
||||
/* all the tests rely on a shared main loop */
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user