]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Run py34 tests with testr
authorClark Boylan <clark.boylan@gmail.com>
Tue, 25 Aug 2015 17:58:57 +0000 (10:58 -0700)
committerAssaf Muller <amuller@redhat.com>
Tue, 25 Aug 2015 23:03:38 +0000 (19:03 -0400)
This doesn't use os-testr but it results in html reports built from
the subunit logs.

A note from amuller: tox -e py27 uses ostestr. The primary difference
between testr and ostestr (For my money) is that ostestr spits out
progression. After a conversation with mtreinish (The author of ostestr)
it doesn't seem to be possible to use tox with ostestr for our py34
tests because we use a long regex that is split on newlines. ostestr
supports the --regex flag as such (regex_a|regex_b), however it's not
possible to use that with newlines and to play nice with tox.
Since I think that we do want to use ostestr (Just like the py27 venv),
I'll work with mtreinish to introduce a white list regex file in to
ostestr. The file will be maintained in the repo and passed in to
ostestr via tox.

Change-Id: I1f1030cca4fd356e468d15126a730725ac9c099c

tox.ini

diff --git a/tox.ini b/tox.ini
index 3c71eea1edd32fbd515ba590b8a4c9dd852a3440..fc5fbbf38ffac873394132e78281524df2a73bee 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -101,8 +101,8 @@ commands = {posargs}
 commands = sphinx-build -W -b html doc/source doc/build/html
 
 [testenv:py34]
-commands = python -m testtools.run \
-    {posargs:neutron.tests.unit.test_context \
+commands = python setup.py test --testr-args='{posargs: \
+     neutron.tests.unit.test_context \
      neutron.tests.unit.services.metering.drivers.test_iptables \
      neutron.tests.unit.services.metering.agents.test_metering_agent \
      neutron.tests.unit.services.test_provider_configuration \
@@ -255,7 +255,7 @@ commands = python -m testtools.run \
      neutron.tests.unit.notifiers.test_nova \
      neutron.tests.unit.notifiers.test_batch_notifier \
      neutron.tests.unit.api.test_extensions \
-     neutron.tests.unit.db.test_db_base_plugin_common}
+     neutron.tests.unit.db.test_db_base_plugin_common}'
 
 [flake8]
 # E125 continuation line does not distinguish itself from next logical line