Use pretty-tox for better test output

Change-Id: I4f64832e99c479977c57031cc7961fa5c1a49470
This commit is contained in:
Sergey Reshetnyak 2015-01-15 18:47:17 +03:00
parent 65e303eb60
commit 99bdbe9ca9
3 changed files with 9 additions and 2 deletions

View File

@ -17,6 +17,7 @@ pylint>=1.3.0 # GNU GPL v2
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
sphinxcontrib-httpdomain
sqlalchemy-migrate>=0.9.1,!=0.9.2
tempest-lib
testrepository>=0.0.18
testscenarios>=0.4
testtools>=0.9.36,!=1.2.0

6
tools/pretty_tox.sh Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -o pipefail
TESTRARGS=$1
python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f

View File

@ -12,14 +12,14 @@ setenv =
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args="{posargs}"
commands = bash tools/pretty_tox.sh '{posargs}'
whitelist_externals = bash
[testenv:integration]
setenv =
VIRTUAL_ENV={envdir}
DISCOVER_DIRECTORY=sahara/tests/integration
commands = python setup.py test --slowest --testr-args="{posargs}"
commands = bash tools/pretty_tox.sh '{posargs}'
[testenv:cover]
commands = python setup.py testr --coverage --testr-args='{posargs}'