From 25cb5cbcb62b09e2c5efe16b1a594877da4fd7de Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Mon, 31 Mar 2014 13:17:27 +0800 Subject: [PATCH] Using testrepository instead of nose. --- debian/changelog | 1 + debian/control | 4 +--- debian/rules | 21 +++++++++------------ 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/debian/changelog b/debian/changelog index 757bbffb..ab74d82b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ python-taskflow (0.1.3-2) unstable; urgency=medium * Adds openstack-pkg-tools as build-depends. (Closes: #743070) * Standards-Version: is now 3.9.5 + * Using testrepository instead of nose. -- Thomas Goirand Mon, 31 Mar 2014 11:15:22 +0800 diff --git a/debian/control b/debian/control index cb8870bc..36747684 100644 --- a/debian/control +++ b/debian/control @@ -22,9 +22,6 @@ Build-depends-indep: alembic (>= 0.4.1), python-iso8601 (>= 0.1.8), python-mock (>= 1.0), python-networkx (>= 1.8), - python-nose, - python-nose-exclude, - python-openstack.nose-plugin (>= 0.7), python-six (>= 1.4.1), python-sqlalchemy (>= 0.7.8), python-stevedore (>= 0.12), @@ -32,6 +29,7 @@ Build-depends-indep: alembic (>= 0.4.1), python-testtools (>= 0.9.34), python-unittest2, python-zake, + subunit (>= 0.0.18), testrepository (>= 0.0.17) Standards-Version: 3.9.5 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=openstack/python-taskflow.git diff --git a/debian/rules b/debian/rules index 2d6ce506..2f29bf04 100755 --- a/debian/rules +++ b/debian/rules @@ -12,17 +12,14 @@ override_dh_clean: dh_clean -O--buildsystem=python_distutils find . -iname '*.pyc' -delete -ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) override_dh_auto_test: - PYTHONPATH=. \ - LANG=en_US.UTF-8 \ - LANGUAGE=en_US:en \ - LC_ALL=C \ - NOSE_WITH_OPENSTACK=1 \ - NOSE_OPENSTACK_COLOR=1 \ - NOSE_OPENSTACK_RED=0.05 \ - NOSE_OPENSTACK_YELLOW=0.025 \ - NOSE_OPENSTACK_SHOW_ELAPSED=1 \ - NOSE_OPENSTACK_STDOUT=1 \ - nosetests --verbosity=2 || true +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) + rm -rf .testrepository + testr init + set -e && \ + TEMP_REZ=`mktemp -t` && \ + PYTHONPATH=. testr run --subunit | tee $$TEMP_REZ | subunit2pyunit ; \ + testr slowest ; \ + cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \ + rm -f $$TEMP_REZ endif