]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Using testr directly, not using run_tests.sh anymore
authorThomas Goirand <thomas@goirand.fr>
Fri, 17 Jul 2015 19:07:28 +0000 (19:07 +0000)
committerThomas Goirand <thomas@goirand.fr>
Sat, 1 Aug 2015 19:00:17 +0000 (19:00 +0000)
debian/rules

index bc51b8471b550070d9f6e2fc96726d74b9686838..ae446c47f0021f5a91dc7dbddde457e98e0cacbb 100755 (executable)
@@ -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: