[Pkg-telepathy-commits] [telepathy-mission-control-6] 08/90: Simplify how the slow test is run

Simon McVittie smcv at debian.org
Wed May 14 12:08:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository telepathy-mission-control-6.

commit 9b4a62db9f36a668f9c48f0b21e42aee46c33b4e
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Mar 26 08:27:33 2014 +0000

    Simplify how the slow test is run
---
 tests/twisted/Makefile.am                        | 12 ++----------
 tests/twisted/account-manager/server-drops-us.py |  6 ++++++
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index 68e42cc..06606a6 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -78,12 +78,9 @@ TWISTED_SPECIAL_BUILD_TESTS = \
 	account-storage/5-14.py \
 	account-storage/create-new.py \
 	account-storage/load-keyfiles.py \
+	account-manager/server-drops-us.py \
 	$(NULL)
 
-# Tests that are usually too slow to run.
-TWISTED_SLOW_TESTS = \
-	account-manager/server-drops-us.py
-
 # Tests that need their own MC instance.
 TWISTED_SEPARATE_TESTS = \
 	account-manager/auto-connect.py \
@@ -273,12 +270,8 @@ check-twisted: $(BUILT_SOURCES)
 	$(MAKE) -C tools
 	rm -f core
 	failed=0; \
-	if test x$(CHECK_TWISTED_SLOW) = x; then \
-		extra_tests= ; \
-	else \
-		extra_tests=' $$(TWISTED_SLOW_TESTS)'; \
-	fi; \
 	MC_TEST_UNINSTALLED=1 \
+	  CHECK_TWISTED_SLOW=$(CHECK_TWISTED_SLOW) \
 	  MC_ABS_TOP_SRCDIR=@abs_top_srcdir@ \
 	  MC_ABS_TOP_BUILDDIR=@abs_top_builddir@ \
 	  sh run-test.sh "${TWISTED_TESTS}${extra_tests}"
@@ -290,7 +283,6 @@ check-twisted: $(BUILT_SOURCES)
 EXTRA_DIST = \
 	$(TWISTED_BASIC_TESTS) \
 	$(TWISTED_SEPARATE_TESTS) \
-	$(TWISTED_SLOW_TESTS) \
 	$(TWISTED_SPECIAL_BUILD_TESTS) \
 	$(TWISTED_OTHER_FILES) \
 	accounts/README \
diff --git a/tests/twisted/account-manager/server-drops-us.py b/tests/twisted/account-manager/server-drops-us.py
index 9a9d6ca..0176b95 100644
--- a/tests/twisted/account-manager/server-drops-us.py
+++ b/tests/twisted/account-manager/server-drops-us.py
@@ -16,6 +16,12 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 # 02110-1301 USA
 
+import os
+
+if not os.environ.get('CHECK_TWISTED_SLOW'):
+    print("SKIP: this test is slow, export CHECK_TWISTED_SLOW=1 to run it")
+    raise SystemExit(77)
+
 import dbus
 import dbus
 import dbus.service

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/telepathy-mission-control-6.git



More information about the Pkg-telepathy-commits mailing list