]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Using testr directly, not using ./run_tests.sh anymore.
authorThomas Goirand <zigo@debian.org>
Mon, 13 Jun 2016 07:02:49 +0000 (09:02 +0200)
committerThomas Goirand <zigo@debian.org>
Mon, 13 Jun 2016 07:03:33 +0000 (09:03 +0200)
Rewritten-From: 53cb89648f744757eeef384c44ec5030b14e48b3

xenial/debian/changelog
xenial/debian/rules

index 43a467b778b3a131ea64465b603500591d782e54..551a710bcfcbc9ce75f5f0cf1c4ff90f4f0b326b 100644 (file)
@@ -7,6 +7,7 @@ neutron (2:9.0.0~b1-1) experimental; urgency=medium
   * Added fix-requirements.txt.patch.
   * Disable auto_clean as it requires a higher version of setuptools, which
     isn't in the sbuild host for Jessie.
+  * Using testr directly, not using ./run_tests.sh anymore.
 
  -- Thomas Goirand <zigo@debian.org>  Thu, 09 Jun 2016 00:59:14 +0200
 
index b1438d454967cd5e969cf8fc588bb3e84d550231..aad9357f0b792a5d2d577d832df5bf4bab6a625f 100755 (executable)
@@ -173,7 +173,19 @@ override_dh_clean:
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
-       PYTHONPATH=build/* ./run_tests.sh -N -P
+       @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 'neutron\.tests\.unit.* | tee $$TEMP_REZ | subunit2pyunit ; \
+               cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
+               rm -f $$TEMP_REZ ; \
+               testr-python$$PYMAJOR slowest ; \
+       done
+       #PYTHONPATH=build/* ./run_tests.sh -N -P
 endif
 
 override_dh_auto_build: