Merge "Pass testr and subunit2html.py a PYTHON envvar."

This commit is contained in:
Jenkins 2013-08-02 20:17:16 +00:00 committed by Gerrit Code Review
commit 992355d7fb
2 changed files with 5 additions and 4 deletions

View File

@ -59,13 +59,14 @@ if [ -d ".testrepository" ] ; then
elif [ -f ".testrepository/0" ] ; then
cp .testrepository/0 ./subunit_log.txt
fi
.tox/$venv/bin/python /usr/local/jenkins/slave_scripts/subunit2html.py ./subunit_log.txt testr_results.html
export PYTHON=.tox/$venv/bin/python
/usr/local/jenkins/slave_scripts/subunit2html.py ./subunit_log.txt testr_results.html
gzip -9 ./subunit_log.txt
gzip -9 ./testr_results.html
set -e
foundcount=$(.tox/$venv/bin/python .tox/$venv/bin/testr list-tests | sed -e '1d' | wc -l)
rancount=$(.tox/$venv/bin/python .tox/$venv/bin/testr last | sed -ne 's/Ran \([0-9]\+\).*tests in.*/\1/p')
foundcount=$(.tox/$venv/bin/testr list-tests | sed -e '1d' | wc -l)
rancount=$(.tox/$venv/bin/testr last | sed -ne 's/Ran \([0-9]\+\).*tests in.*/\1/p')
if [ "$rancount" -lt "$foundcount" ] ; then
echo
echo "The number of tests found was greater than the number of tests"

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
"""
Utility to convert a subunit stream to an html results file.
Code is adapted from the pyunit Html test runner at