[telepathy-qt4/master] Avoid the real AccountManager being service-activated during distcheck
Simon McVittie
simon.mcvittie at collabora.co.uk
Thu Dec 3 13:01:39 PST 2009
---
tests/Makefile.am | 9 ++++++++-
tests/dbus-1/session.conf.in | 30 ++++++++++++++++++++++++++++++
tests/dbus/Makefile.am | 3 ++-
3 files changed, 40 insertions(+), 2 deletions(-)
create mode 100644 tests/dbus-1/session.conf.in
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7d3b396..7e01b26 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,8 +1,9 @@
include $(top_srcdir)/tools/telepathy-qt4.mk
-# compile lib/ first, so it can be used by tests in the other directories
+# compile lib/ and this dir first, so they can be used by dbus tests
SUBDIRS = \
lib \
+ . \
dbus
# Standalone tests that don't touch D-Bus
@@ -19,9 +20,14 @@ test_manager_file_SOURCES = \
manager-file.cpp
BUILT_SOURCES = \
+ dbus-1/session.conf \
_gen/key-file.cpp.moc.hpp \
_gen/manager-file.cpp.moc.hpp
+dbus-1/%.conf: $(srcdir)/dbus-1/%.conf.in
+ $(AM_V_at)$(mkdir_p) dbus-1
+ $(AM_V_GEN)sed -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" $< > $@
+
LDADD = \
$(QTCORE_LIBS) \
$(QTDBUS_LIBS) \
@@ -51,6 +57,7 @@ CLEANFILES = \
EXTRA_DIST = \
README \
+ dbus-1/session.conf.in \
dbus-1/services/account-manager.service.in \
dbus-1/services/spurious.service \
telepathy/managers/spurious.manager \
diff --git a/tests/dbus-1/session.conf.in b/tests/dbus-1/session.conf.in
new file mode 100644
index 0000000..6babc16
--- /dev/null
+++ b/tests/dbus-1/session.conf.in
@@ -0,0 +1,30 @@
+<!-- Copied from telepathy-gabble (which doubtless copied it from somewhere
+ else) and modified.
+ This configuration file controls the per-user-login-session message bus.
+ Add a session-local.conf and edit that rather than changing this
+ file directly. -->
+
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <!-- Our well-known bus type, don't change this -->
+ <type>session</type>
+
+ <listen>unix:tmpdir=/tmp</listen>
+
+ <servicedir>@abs_top_builddir@/tests/dbus-1/services/</servicedir>
+
+ <policy context="default">
+ <!-- Allow everything to be sent -->
+ <allow send_destination="*" eavesdrop="true"/>
+ <!-- Allow everything to be received -->
+ <allow eavesdrop="true"/>
+ <!-- Allow anyone to own anything -->
+ <allow own="*"/>
+ </policy>
+
+ <!-- This is included last so local configuration can override what's
+ in this standard file -->
+
+
+</busconfig>
diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index 7b67c75..be12bea 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -153,7 +153,8 @@ TESTS_ENV = \
TESTS_ENVIRONMENT = \
$(TESTS_ENV) \
- sh $(top_srcdir)/tools/with-session-bus.sh --session --
+ sh $(top_srcdir)/tools/with-session-bus.sh \
+ --config-file=$(top_builddir)/tests/dbus-1/session.conf --
CLEANFILES = \
$(BUILT_SOURCES)
--
1.5.6.5
More information about the telepathy-commits
mailing list