2014-04-22 15:16:18 -07:00
|
|
|
#!/bin/bash -xe
|
|
|
|
|
2014-12-16 18:11:27 -05:00
|
|
|
# Run coverage via tox. Also, run pbr freeze on the
|
2014-04-22 15:16:18 -07:00
|
|
|
# resulting environment at the end so that we have a record of exactly
|
|
|
|
# what packages we ended up testing.
|
|
|
|
|
|
|
|
export NOSE_COVER_HTML=1
|
2015-09-28 17:56:51 +10:00
|
|
|
export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt
|
2014-04-22 15:16:18 -07:00
|
|
|
|
2015-09-28 17:56:51 +10:00
|
|
|
venv=${1:-cover}
|
2014-04-22 15:16:18 -07:00
|
|
|
|
|
|
|
# Workaround the combo of tox running setup.py outside of virtualenv
|
|
|
|
# and RHEL having an old distribute. The next line can be removed
|
|
|
|
# when either get fixed.
|
|
|
|
python setup.py --version
|
|
|
|
|
|
|
|
tox -e$venv
|
|
|
|
result=$?
|
2014-12-16 18:11:27 -05:00
|
|
|
[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip
|
2014-04-22 15:16:18 -07:00
|
|
|
|
2014-12-16 18:11:27 -05:00
|
|
|
echo "Begin $freezecmd freeze output from test virtualenv:"
|
2014-04-22 15:16:18 -07:00
|
|
|
echo "======================================================================"
|
2014-12-23 10:42:31 -08:00
|
|
|
.tox/${venv}/bin/${freezecmd} freeze
|
2014-04-22 15:16:18 -07:00
|
|
|
echo "======================================================================"
|
|
|
|
|
|
|
|
exit $result
|