From: Simon McVittie Date: Tue, 19 Mar 2013 12:23:34 +0000 (+0000) Subject: Run libsocialweb tests under GTestDBus instead of with-session-bus.sh X-Git-Tag: FOLKS_0_9_2~75 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40abe98da11f65f58078a102ba1fa6c250cc253f;p=platform%2Fupstream%2Ffolks.git 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 Reviewed-by: Philip Withnall --- 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/session.conf.in b/tests/lib/libsocialweb/session.conf.in deleted file mode 100644 index 0086c6e..0000000 --- a/tests/lib/libsocialweb/session.conf.in +++ /dev/null @@ -1,54 +0,0 @@ - - - - session - - - - - unix:tmpdir=/tmp - - - @abs_top_srcdir@/tests/lib/libsocialweb - - - - - - - - - - - - 60000 - - contexts/dbus_contexts - - - - - 1000000000 - 1000000000 - 1000000000 - 120000 - 240000 - 100000 - 10000 - 100000 - 10000 - 50000 - 50000 - 50000 - - 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 = \