[dconf/wip/reorg] tests/: test the libdbus-1 DBus backend
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf/wip/reorg] tests/: test the libdbus-1 DBus backend
- Date: Wed, 11 Jul 2012 16:43:46 +0000 (UTC)
commit ebf22c7253795313870e8d5f112d7d79d2db8969
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Jul 11 12:40:22 2012 -0400
tests/: test the libdbus-1 DBus backend
Add a testcase for the libdbus-1 DBus backend. It uses the existing
testcase code and undergoes the same tests as the two other backends.
There is one exception: we do not test for failure to connect to D-Bus
because the D-Bus connections are passed up-front for the libdbus-1
case, as arguments to dconf_dbus_client_new().
tests/.gitignore | 1 +
tests/Makefile.am | 8 ++++++++
tests/dbus.c | 4 +++-
3 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/tests/.gitignore b/tests/.gitignore
index bada923..9e74fd0 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -8,5 +8,6 @@ gdbus-filter
gdbus-thread
gsettings
gvdb
+libdbus-1
paths
shm
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a4be908..09592e0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -68,6 +68,14 @@ gdbus_filter_LDADD = \
$(gio_LIBS)
gdbus_filter_SOURCES = dbus.c
+TEST_PROGS += libdbus-1
+libdbus_1_CFLAGS = $(gio_CFLAGS) -DDBUS_BACKEND=\"/libdbus-1\"
+libdbus_1_LDADD = \
+ ../dbus-1/libdconf-libdbus-1.a \
+ $(glib_LIBS) \
+ $(dbus_LIBS)
+libdbus_1_SOURCES = dbus.c
+
TEST_PROGS += engine
engine_CFLAGS = $(glib_CFLAGS) -DSRCDIR=\"$(abs_srcdir)\"
engine_LDADD = \
diff --git a/tests/dbus.c b/tests/dbus.c
index 53d5456..d411c06 100644
--- a/tests/dbus.c
+++ b/tests/dbus.c
@@ -409,7 +409,9 @@ main (int argc, char **argv)
dconf_engine_dbus_init_for_testing ();
/* test_creation_error absolutely must come first */
- g_test_add_func (DBUS_BACKEND "/creation/error", test_creation_error);
+ if (!g_str_equal (DBUS_BACKEND, "/libdbus-1"))
+ g_test_add_func (DBUS_BACKEND "/creation/error", test_creation_error);
+
g_test_add_func (DBUS_BACKEND "/sync-call/success", test_sync_call_success);
g_test_add_func (DBUS_BACKEND "/sync-call/error", test_sync_call_error);
g_test_add_func (DBUS_BACKEND "/async-call/success", test_async_call_success);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]