[evolution-data-server/openismus-work] tests: Use private D-Bus session in EBookClient test
- From: Mathias Hasselmann <hasselmm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work] tests: Use private D-Bus session in EBookClient test
- Date: Tue, 11 Dec 2012 23:57:52 +0000 (UTC)
commit 925dad4515588bf262421be5ee26335e4a603b64
Author: Mathias Hasselmann <mathias openismus com>
Date: Thu Dec 6 14:33:10 2012 +0100
tests: Use private D-Bus session in EBookClient test
tests/libebook/client/Makefile.am | 11 +++++++++--
tests/libebook/client/client-test-utils.c | 10 ++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/tests/libebook/client/Makefile.am b/tests/libebook/client/Makefile.am
index 83900de..3972b86 100644
--- a/tests/libebook/client/Makefile.am
+++ b/tests/libebook/client/Makefile.am
@@ -1,6 +1,11 @@
noinst_LTLIBRARIES = libclient-test-utils.la
-libclient_test_utils_la_SOURCES = client-test-utils.c client-test-utils.h
+libclient_test_utils_la_SOURCES = \
+ client-test-utils.c \
+ client-test-utils.h \
+ $(top_srcdir)/tests/libedataserver/e-test-dbus-utils.c \
+ $(top_srcdir)/tests/libedataserver/e-test-dbus-utils.h \
+ $(NULL)
libclient_test_utils_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
@@ -8,7 +13,9 @@ libclient_test_utils_la_CPPFLAGS = \
-I$(top_builddir) \
-I$(top_srcdir)/addressbook \
-I$(top_builddir)/addressbook \
- -DBACKENDDIR=\"$(ebook_backenddir)\" \
+ -I$(top_srcdir)/tests/libedataserver \
+ -DBACKENDDIR=\"$(ebook_backenddir)\" \
+ -DDATADIR=\"$(datadir)\" \
-DSRCDIR=\""$(abs_srcdir)"\" \
$(EVOLUTION_ADDRESSBOOK_CFLAGS) \
$(CAMEL_CFLAGS) \
diff --git a/tests/libebook/client/client-test-utils.c b/tests/libebook/client/client-test-utils.c
index 17e868b..89d81bb 100644
--- a/tests/libebook/client/client-test-utils.c
+++ b/tests/libebook/client/client-test-utils.c
@@ -28,6 +28,7 @@
#include <libedataserver/libedataserver.h>
#include "client-test-utils.h"
+#include "e-test-dbus-utils.h"
/* This forces the GType to be registered in a way that
* avoids a "statement with no effect" compiler warning.
@@ -98,6 +99,7 @@ void
main_initialize (void)
{
static gboolean initialized = FALSE;
+ GTestDBus *test_dbus = NULL;
if (initialized)
return;
@@ -105,6 +107,14 @@ main_initialize (void)
g_type_init ();
e_gdbus_templates_init_main_thread ();
+ e_test_setup_base_directories ();
+ test_dbus = e_test_setup_dbus_session ();
+
+ g_test_dbus_up (test_dbus);
+
+ g_print ("Using private D-Bus session for testing: \"%s\"\n",
+ g_test_dbus_get_bus_address (test_dbus));
+
initialized = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]