This commit adds the pretty_tox.sh script and the usage of
subunit-trace to the cinder unit test jobs. This also updates the
run_tests.sh script to use subunit-trace so it'll have consistent
output formatting with the tox job.
Change-Id: I8ceafb476dc488b388c7f63501ef48128d8383d2
${wrapper} python setup.py egg_info
fi
echo "Running \`${wrapper} $TESTRTESTS\`"
- if ${wrapper} which subunit-2to1 2>&1 > /dev/null
- 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
+ bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-trace"
RESULT=$?
set -e
testtools>=0.9.36,!=1.2.0
testrepository>=0.0.18
oslosphinx>=2.2.0 # Apache-2.0
+tempest-lib>=0.2.0
--- /dev/null
+#!/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
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
- python setup.py testr --slowest --testr-args='--concurrency 1 {posargs}'
+ bash tools/pretty_tox.sh '{posargs}'
whitelist_externals = bash
[tox:jenkins]