[folks] Run libsocialweb tests under GTestDBus instead of with-session-bus.sh
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Run libsocialweb tests under GTestDBus instead of with-session-bus.sh
- Date: Wed, 20 Mar 2013 11:52:54 +0000 (UTC)
commit 40abe98da11f65f58078a102ba1fa6c250cc253f
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Tue Mar 19 12:23:34 2013 +0000
Run libsocialweb tests under GTestDBus instead of with-session-bus.sh
Bug https://bugzilla.gnome.org/show_bug.cgi?id=690830
Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
Reviewed-by: Philip Withnall <philip tecnocode co uk>
configure.ac | 1 -
tests/lib/libsocialweb/Makefile.am | 5 ---
tests/lib/libsocialweb/session.conf.in | 54 --------------------------------
tests/lib/libsocialweb/test-case.vala | 21 +++++--------
tests/libsocialweb/Makefile.am | 9 ++---
5 files changed, 11 insertions(+), 79 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8f5166c..bb89574 100644
--- a/configure.ac
+++ b/configure.ac
@@ -654,7 +654,6 @@ AC_CONFIG_FILES([
tests/lib/eds/Makefile
tests/lib/key-file/Makefile
tests/lib/libsocialweb/Makefile
- tests/lib/libsocialweb/session.conf
tests/lib/telepathy/Makefile
tests/lib/tracker/Makefile
tests/lib/telepathy/contactlist/Makefile
diff --git a/tests/lib/libsocialweb/Makefile.am b/tests/lib/libsocialweb/Makefile.am
index d3520ee..a338eb3 100644
--- a/tests/lib/libsocialweb/Makefile.am
+++ b/tests/lib/libsocialweb/Makefile.am
@@ -47,14 +47,9 @@ MAINTAINERCLEANFILES = \
libsocialweb-test.h \
$(NULL)
-DISTCLEANFILES = \
- session.conf \
- $(NULL)
-
EXTRA_DIST = \
libsocialweb-test.vapi \
libsocialweb-test.h \
- session.conf.in \
$(NULL)
GITIGNOREFILES = \
diff --git a/tests/lib/libsocialweb/test-case.vala b/tests/lib/libsocialweb/test-case.vala
index 2d83bb1..90b6ceb 100644
--- a/tests/lib/libsocialweb/test-case.vala
+++ b/tests/lib/libsocialweb/test-case.vala
@@ -25,9 +25,6 @@
/**
* A test case for the libsocialweb backend. Folks is configured
* to use that backend and no others, with no primary store.
- *
- * FIXME: for now, this relies on being run under with-session-bus.sh
- * with no activatable services.
*/
public class LibsocialwebTest.TestCase : Folks.TestCase
{
@@ -42,23 +39,21 @@ public class LibsocialwebTest.TestCase : Folks.TestCase
public TestCase (string name)
{
- /* This variable is set in the same place as the various variables we
- * care about for sandboxing purposes, like XDG_CONFIG_HOME and
- * DBUS_SESSION_BUS_ADDRESS. */
- if (Environment.get_variable ("FOLKS_TESTS_SANDBOXED_DBUS")
- != "no-services")
- error ("libsocialweb tests must be run in a private D-Bus session");
-
base (name);
Environment.set_variable ("FOLKS_BACKENDS_ALLOWED", "libsocialweb", true);
Environment.set_variable ("FOLKS_PRIMARY_STORE", "", true);
}
- public override void private_bus_up ()
+ /**
+ * This test does use libdbus, via libsocialweb.
+ */
+ public override bool uses_dbus_1
{
- /* Don't do anything. We're currently relying on
- * being wrapped in with-session-bus.sh. */
+ get
+ {
+ return true;
+ }
}
/**
diff --git a/tests/libsocialweb/Makefile.am b/tests/libsocialweb/Makefile.am
index f61c9de..14b5e55 100644
--- a/tests/libsocialweb/Makefile.am
+++ b/tests/libsocialweb/Makefile.am
@@ -24,8 +24,6 @@ LDADD = \
-L$(top_srcdir)/backends/libsocialweb/lib \
$(NULL)
-RUN_WITH_PRIVATE_BUS = $(top_srcdir)/tests/tools/with-session-bus.sh
-
AM_VALAFLAGS += \
$(ERROR_VALAFLAGS) \
--vapidir=. \
@@ -50,12 +48,11 @@ noinst_PROGRAMS = \
aggregation \
$(NULL)
-SESSION_CONF = $(top_builddir)/tests/lib/libsocialweb/session.conf
TESTS_ENVIRONMENT = \
FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
- $(RUN_WITH_PRIVATE_BUS) \
- --config-file=$(SESSION_CONF) \
- --
+ $(top_srcdir)/tests/tools/execute-test.sh \
+ $(NULL)
+
TESTS = $(noinst_PROGRAMS)
dummy_lsw_SOURCES = \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]