Port over pretty_tox.sh from Nova
Nova has a bash script that uses the ostestr package to format the output from tox in a 'pretty' format. It makes it much more readable. pretty_tox.sh is pulled from Nova as-is and enabled in tox.ini. Change-Id: Ib90791b1333044c98e20444953d7ccab21cd62ba
This commit is contained in:
parent
a339ce2faf
commit
02b5c9f0d0
|
@ -8,6 +8,7 @@ python-subunit
|
||||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
||||||
oslosphinx>=2.5.0 # Apache-2.0
|
oslosphinx>=2.5.0 # Apache-2.0
|
||||||
oslotest>=1.5.1 # Apache-2.0
|
oslotest>=1.5.1 # Apache-2.0
|
||||||
|
os-testr>=0.4.1 # Apache-2.0
|
||||||
testrepository>=0.0.18
|
testrepository>=0.0.18
|
||||||
testscenarios>=0.4
|
testscenarios>=0.4
|
||||||
testtools>=1.4.0
|
testtools>=1.4.0
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
TESTRARGS=$1
|
||||||
|
|
||||||
|
# --until-failure is not compatible with --subunit see:
|
||||||
|
#
|
||||||
|
# https://bugs.launchpad.net/testrepository/+bug/1411804
|
||||||
|
#
|
||||||
|
# this work around exists until that is addressed
|
||||||
|
if [[ "$TESTARGS" =~ "until-failure" ]]; then
|
||||||
|
python setup.py testr --slowest --testr-args="$TESTRARGS"
|
||||||
|
else
|
||||||
|
python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f
|
||||||
|
fi
|
3
tox.ini
3
tox.ini
|
@ -12,7 +12,8 @@ deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
-egit+https://github.com/openstack/nova#egg=nova
|
-egit+https://github.com/openstack/nova#egg=nova
|
||||||
-egit+https://github.com/powervm/pypowervm@develop#egg=pypowervm
|
-egit+https://github.com/powervm/pypowervm@develop#egg=pypowervm
|
||||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
whitelist_externals = bash
|
||||||
|
commands = bash tools/pretty_tox.sh '{posargs}'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands = flake8
|
commands = flake8
|
||||||
|
|
Loading…
Reference in New Issue