project-config/jenkins/scripts/run-cover.sh
Sachi King 66e6468d50 Add cover-constraints jobs to Neutron
Adds cover-constraints jobs and adds it to Neutron's check queue

Implements Blueprint: Requirements-Management

Change-Id: Ia3cb7d69cac0e4763525516702aea0b214400c94
2015-10-19 11:27:52 +11:00

27 lines
818 B
Bash
Executable File

#!/bin/bash -xe
# Run coverage via tox. Also, run pbr freeze on the
# resulting environment at the end so that we have a record of exactly
# what packages we ended up testing.
export NOSE_COVER_HTML=1
export UPPER_CONSTRAINTS_FILE=$(pwd)/upper-constraints.txt
venv=${1:-cover}
# 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=$?
[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip
echo "Begin $freezecmd freeze output from test virtualenv:"
echo "======================================================================"
.tox/${venv}/bin/${freezecmd} freeze
echo "======================================================================"
exit $result