Port over pretty_tox.sh from nova-powervm
nova-powervm 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 and nova-powervm as-is and enabled in tox.ini. Change-Id: I9e90c4d595b95ae02be244163f27d87409e3a078
This commit is contained in:
parent
1d895f4b6f
commit
2bb305dd39
@ -9,6 +9,7 @@ testrepository>=0.0.18
|
||||
testscenarios>=0.4
|
||||
testtools>=1.4.0 # MIT
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
os-testr>=0.4.1 # Apache-2.0
|
||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
||||
oslosphinx>=2.5.0,!=3.4.0 # Apache-2.0
|
||||
mock>=1.2 # BSD
|
||||
|
16
tools/pretty_tox.sh
Normal file
16
tools/pretty_tox.sh
Normal file
@ -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
|
||||
-egit+https://github.com/openstack/ceilometer#egg=ceilometer
|
||||
-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}'
|
||||
downloadcache = {toxworkdir}/_download
|
||||
|
||||
[testenv:pep8]
|
||||
|
Loading…
x
Reference in New Issue
Block a user