From: Thomas Goirand Date: Fri, 17 Jul 2015 19:07:28 +0000 (+0000) Subject: Using testr directly, not using run_tests.sh anymore X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b62b48e49b03ae5e6b92087dc0396b6917e89fd5;p=openstack-build%2Fcinder-build.git Using testr directly, not using run_tests.sh anymore Rewritten-From: d66cb35c323704ce8486d11c228c97e4b40fcb4f --- diff --git a/xenial/debian/rules b/xenial/debian/rules index bc51b8471..ae446c47f 100755 --- a/xenial/debian/rules +++ b/xenial/debian/rules @@ -7,9 +7,20 @@ export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog -S Version | sed -e 's/^ %: dh $@ --with python2,systemd -ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) override_dh_auto_test: - PYTHONPATH=$(CURDIR) bash run_tests.sh -N -P +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) + @echo "===> Running tests" + set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; do \ + PYMAJOR=`echo $$i | cut -d'.' -f1` ; \ + echo "===> Testing with python$$i (python$$PYMAJOR)" ; \ + rm -rf .testrepository ; \ + testr-python$$PYMAJOR init ; \ + TEMP_REZ=`mktemp -t` ; \ + PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit | tee $$TEMP_REZ | subunit2pyunit ; \ + cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \ + rm -f $$TEMP_REZ ; \ + testr-python$$PYMAJOR slowest ; \ + done endif override_dh_clean: