[glib] gio/tests: Fix gdbus-connection when run from "make check"
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gio/tests: Fix gdbus-connection when run from "make check"
- Date: Tue, 21 May 2013 13:21:43 +0000 (UTC)
commit bb1a5ca9a8488bbbfc06f961e2275c36b354ed3b
Author: Colin Walters <walters verbum org>
Date: Tue May 21 09:21:21 2013 -0400
gio/tests: Fix gdbus-connection when run from "make check"
gio/tests/Makefile.am | 1 +
gio/tests/gdbus-connection.c | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index bf56832..7697ccb 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -136,6 +136,7 @@ other_progs = \
gdbus-testserver \
gdbus-connection-flush-helper \
$(NULL)
+noinst_PROGRAMS += $(other_progs)
if OS_UNIX
test_progs += \
diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c
index 1ab04a2..43c6d28 100644
--- a/gio/tests/gdbus-connection.c
+++ b/gio/tests/gdbus-connection.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]