Merge "Use subunit-trace to enable output during unit test runs"
This commit is contained in:
commit
931aaea52a
@ -150,14 +150,7 @@ function run_tests {
|
|||||||
${wrapper} python setup.py egg_info
|
${wrapper} python setup.py egg_info
|
||||||
fi
|
fi
|
||||||
echo "Running \`${wrapper} $TESTRTESTS\`"
|
echo "Running \`${wrapper} $TESTRTESTS\`"
|
||||||
if ${wrapper} which subunit-2to1 2>&1 > /dev/null
|
bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-trace"
|
||||||
then
|
|
||||||
# subunit-2to1 is present, testr subunit stream should be in version 2
|
|
||||||
# format. Convert to version one before colorizing.
|
|
||||||
bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py"
|
|
||||||
else
|
|
||||||
bash -c "${wrapper} $TESTRTESTS | ${wrapper} tools/colorizer.py"
|
|
||||||
fi
|
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -17,3 +17,4 @@ python-subunit>=0.0.18
|
|||||||
testtools>=0.9.36,!=1.2.0
|
testtools>=0.9.36,!=1.2.0
|
||||||
testrepository>=0.0.18
|
testrepository>=0.0.18
|
||||||
oslosphinx>=2.2.0 # Apache-2.0
|
oslosphinx>=2.2.0 # Apache-2.0
|
||||||
|
tempest-lib>=0.2.0
|
||||||
|
16
tools/pretty_tox.sh
Executable file
16
tools/pretty_tox.sh
Executable 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 test --no-parallel --slowest --testr-args="$TESTRARGS"
|
||||||
|
else
|
||||||
|
python setup.py test --no-parallel --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f
|
||||||
|
fi
|
2
tox.ini
2
tox.ini
@ -14,7 +14,7 @@ install_command = pip install {opts} {packages}
|
|||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --slowest --testr-args='--concurrency 1 {posargs}'
|
bash tools/pretty_tox.sh '{posargs}'
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
|
|
||||||
[tox:jenkins]
|
[tox:jenkins]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user