[next] telepathy-mission-control: installed-tests: have one GNOME-style installed-test per Python test-case

Simon McVittie smcv at kemper.freedesktop.org
Thu Apr 3 07:27:56 PDT 2014


Module: telepathy-mission-control
Branch: next
Commit: f09076f660157d7b51870c9d018da635cd66a501
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=f09076f660157d7b51870c9d018da635cd66a501

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Thu Mar 20 17:51:16 2014 +0000

installed-tests: have one GNOME-style installed-test per Python test-case

---

 tests/twisted/Makefile.am |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index 467cbde..c7044eb 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -122,12 +122,12 @@ TWISTED_OTHER_FILES = \
 mc-twisted-tests.list:
 	$(AM_V_GEN)echo $(TWISTED_BASIC_TESTS) $(TWISTED_SEPARATE_TESTS) > $@
 
-twisted-tests.test: Makefile
+%.test: Makefile
+	@$(MKDIR_P) $(dir $*)
 	$(AM_V_GEN)( echo '[Test]'; \
-		echo 'Exec=${twistedtestsdir}/run-test.sh'; \
+		echo 'Exec=${twistedtestsdir}/run-test.sh $*.py'; \
 		echo 'Type=session'; \
 		echo 'Output=TAP' ) > $@.tmp
-	@chmod +x $@.tmp
 	@mv $@.tmp $@
 
 run-test.sh: run-test.sh.in Makefile
@@ -139,7 +139,10 @@ run-test.sh: run-test.sh.in Makefile
 
 if ENABLE_INSTALLED_TESTS
 insttestdir = ${datadir}/installed-tests/telepathy-mission-control
-nodist_insttest_DATA = twisted-tests.test
+nobase_nodist_insttest_DATA = \
+	$(patsubst %.py,%.test,$(TWISTED_BASIC_TESTS)) \
+	$(patsubst %.py,%.test,$(TWISTED_SEPARATE_TESTS)) \
+	$(NULL)
 
 # Install files in each directory. They could be tests, pristine data files,
 # scripts or built source
@@ -172,7 +175,6 @@ config.py: Makefile
 BUILT_SOURCES = \
 	config.py \
 	mc-twisted-tests.list \
-	twisted-tests.test \
 	run-test.sh \
 	$(NULL)
 



More information about the telepathy-commits mailing list