Switch tox unit test command to use ostestr

This commit switches the tox command to use ostestr instead of calling
testr through setup.py. The primary advantage here is that it uses the
subunit-trace output filter. ostestr primarily exists as a replacement
for pretty_tox.sh bash scripts which spread like a plague through
OpenStack projects after Nova copied it from Tempest. (although ostestr
also provides some other useful features) Granted ironic wasn't using
that, but this commit makes the switch to enable getting the
subunit-trace output which is generally useful.

Note that this dramatically increases output while running tests.
However, test failures are still at the bottom of the output, so it
shouldn't cause much pain, if any.

Change-Id: I1acc2deadc01421baec256352b35a646676445e5
This commit is contained in:
Matthew Treinish 2015-09-25 22:18:22 -04:00 committed by Jim Rollenhagen
parent 91d7298e17
commit 9b20bf883f
2 changed files with 3 additions and 4 deletions

View File

@ -11,8 +11,8 @@ oslotest>=1.10.0 # Apache-2.0
psycopg2>=2.5
python-ironicclient>=0.8.0
python-subunit>=0.0.18
testrepository>=0.0.18
testtools>=1.4.0
os-testr>=0.1.0
# Doc requirements
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2

View File

@ -11,10 +11,9 @@ install_command =
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
TESTS_DIR=./ironic/tests/unit/
deps = -r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands =
bash -c "TESTS_DIR=./ironic/tests/unit/ python setup.py testr --slowest --testr-args='{posargs}'"
commands = ostestr {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[tox:jenkins]