Fix make check with builddir != srcdir

This broke when the tests were converted to be installable.
My apologies.
This commit is contained in:
Matthias Clasen
2013-05-27 21:20:10 -04:00
parent 4ec32e6fa8
commit 98a921045c
10 changed files with 32 additions and 22 deletions

View File

@@ -26,7 +26,7 @@
#include "gdbus-tests.h"
static const gchar *datapath;
static const gchar *binpath;
/* all tests rely on a global connection */
static GDBusConnection *c = NULL;
@@ -586,16 +586,16 @@ main (int argc,
gchar *path;
if (g_getenv ("G_TEST_DATA"))
datapath = g_getenv ("G_TEST_DATA");
binpath = g_getenv ("G_TEST_DATA");
else
datapath = SRCDIR;
binpath = BUILDDIR;
g_test_init (&argc, &argv, NULL);
session_bus_up ();
/* this is safe; testserver will exit once the bus goes away */
path = g_build_filename (datapath, "gdbus-testserver", NULL);
path = g_build_filename (binpath, "gdbus-testserver", NULL);
g_assert (g_spawn_command_line_async (path, NULL));
g_free (path);