[telepathy-mission-control/master] tests: Provide a fake activatable Telepathy client (simulating AbiWord with stream tubes)

Simon McVittie simon.mcvittie at collabora.co.uk
Tue May 26 08:34:42 PDT 2009


---
 .gitignore                                    |    2 +-
 test/twisted/Makefile.am                      |    1 +
 test/twisted/telepathy/clients/AbiWord.client |    6 ++++++
 test/twisted/tools/Client.AbiWord.service.in  |    3 +++
 test/twisted/tools/Makefile.am                |   10 +++++++---
 test/twisted/tools/fake-startup.sh            |    5 +++++
 6 files changed, 23 insertions(+), 4 deletions(-)
 create mode 100644 test/twisted/telepathy/clients/AbiWord.client
 create mode 100644 test/twisted/tools/Client.AbiWord.service.in
 create mode 100644 test/twisted/tools/fake-startup.sh

diff --git a/.gitignore b/.gitignore
index b171854..97f3fea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,7 +76,7 @@ test/twisted/with-session-bus-*.dbus-monitor-logs
 /test/twisted/mc-debug-server
 test/twisted/tools/exec-with-log.sh
 test/twisted/tools/missioncontrol-*.log
-test/twisted/tools/org.freedesktop.Telepathy.MissionControl.service
 test/twisted/tools/tmp-session-bus.conf
+/test/twisted/tools/*.service
 util/mc-account-convert
 util/mc-tool
diff --git a/test/twisted/Makefile.am b/test/twisted/Makefile.am
index 0d3bacb..9855c65 100644
--- a/test/twisted/Makefile.am
+++ b/test/twisted/Makefile.am
@@ -111,6 +111,7 @@ EXTRA_DIST = \
 	$(TWISTED_BASIC_TESTS) \
 	$(TWISTED_SEPARATE_TESTS) \
 	telepathy/clients/README \
+	telepathy/clients/AbiWord.client \
 	telepathy/managers/fakecm.manager \
 	telepathy/managers/README \
 	constants.py \
diff --git a/test/twisted/telepathy/clients/AbiWord.client b/test/twisted/telepathy/clients/AbiWord.client
new file mode 100644
index 0000000..dcca3ad
--- /dev/null
+++ b/test/twisted/telepathy/clients/AbiWord.client
@@ -0,0 +1,6 @@
+[org.freedesktop.Telepathy.Client]
+Interfaces=org.freedesktop.Telepathy.Client.Handler
+
+[org.freedesktop.Telepathy.Client.Handler.HandlerChannelFilter 0]
+org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT
+org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT.Service s=x-abiword
diff --git a/test/twisted/tools/Client.AbiWord.service.in b/test/twisted/tools/Client.AbiWord.service.in
new file mode 100644
index 0000000..418bc38
--- /dev/null
+++ b/test/twisted/tools/Client.AbiWord.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.freedesktop.Telepathy.Client.AbiWord
+Exec=/bin/sh @abs_top_srcdir@/test/twisted/tools/fake-startup.sh org.freedesktop.Telepathy.Client.AbiWord
diff --git a/test/twisted/tools/Makefile.am b/test/twisted/tools/Makefile.am
index bdff43e..9a668f2 100644
--- a/test/twisted/tools/Makefile.am
+++ b/test/twisted/tools/Makefile.am
@@ -11,11 +11,14 @@ exec-with-log.sh: exec-with-log.sh.in Makefile
 # in tarballs are non-portable (and automake 1.8 doesn't let us build
 # non-archaic tarballs)
 org.freedesktop.Telepathy.%.service: %.service.in
-	sed -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" $< > $@
+	sed \
+		-e "s|[@]abs_top_srcdir[@]|@abs_top_srcdir@|g" \
+		-e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" \
+		$< > $@
 
 # D-Bus service file for testing
-service_in_files = MissionControl.service.in
-service_files = org.freedesktop.Telepathy.MissionControl.service
+service_in_files = MissionControl.service.in Client.AbiWord.service.in
+service_files = $(patsubst %.in,org.freedesktop.Telepathy.%, $(service_in_files))
 
 # D-Bus config file for testing
 conf_in_files = tmp-session-bus.conf.in
@@ -27,6 +30,7 @@ EXTRA_DIST = \
 	$(service_in_files) \
 	$(conf_in_files) \
 	exec-with-log.sh.in \
+	fake-startup.sh \
 	with-session-bus.sh
 
 CLEANFILES = \
diff --git a/test/twisted/tools/fake-startup.sh b/test/twisted/tools/fake-startup.sh
new file mode 100644
index 0000000..d571c01
--- /dev/null
+++ b/test/twisted/tools/fake-startup.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+dbus-send --session --type=signal --print-reply \
+/org/freedesktop/Telepathy/RegressionTests \
+org.freedesktop.Telepathy.RegressionTests.FakeStartup \
+string:"$1"
-- 
1.5.6.5




More information about the telepathy-commits mailing list