From ad5bbb498b171acefda23fcc37bfd93b6a3a9989 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 16 Dec 2014 18:11:27 -0500 Subject: [PATCH] Move to pbr freeze from pip freeze For the things that use pbr, we no longer have git shas in the version numbers. So, in order to verify what exact version of things we're installing, use pbr freeze to collect the information. Change-Id: I41ff993aa86e6a7ac1beed3cc5a3b94dcadbdd7c --- jenkins/scripts/run-cover.sh | 7 ++++--- jenkins/scripts/run-docs.sh | 7 ++++--- jenkins/scripts/run-pep8.sh | 10 +++++++--- jenkins/scripts/run-selenium.sh | 8 +++++--- jenkins/scripts/run-tox.sh | 7 ++++--- 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/jenkins/scripts/run-cover.sh b/jenkins/scripts/run-cover.sh index 245aa25469..e0bc93f063 100755 --- a/jenkins/scripts/run-cover.sh +++ b/jenkins/scripts/run-cover.sh @@ -1,6 +1,6 @@ #!/bin/bash -xe -# Run coverage via tox. Also, run pip freeze on the +# 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. @@ -15,10 +15,11 @@ python setup.py --version tox -e$venv result=$? +[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip -echo "Begin pip freeze output from test virtualenv:" +echo "Begin $freezecmd freeze output from test virtualenv:" echo "======================================================================" -.tox/$venv/bin/pip freeze +tox -e$venv -- $freezecmd freeze echo "======================================================================" exit $result diff --git a/jenkins/scripts/run-docs.sh b/jenkins/scripts/run-docs.sh index 359d510cf5..89ec1064c1 100755 --- a/jenkins/scripts/run-docs.sh +++ b/jenkins/scripts/run-docs.sh @@ -2,16 +2,17 @@ # If a bundle file is present, call tox with the jenkins version of # the test environment so it is used. Otherwise, use the normal -# (non-bundle) test environment. Also, run pip freeze on the +# (non-bundle) test environment. 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. # venv=venv +[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip -echo "Begin pip freeze output from test virtualenv:" +echo "Begin pbr freeze output from test virtualenv:" echo "======================================================================" -tox -e$venv -- pip freeze +tox -e$venv -- $freezecmd freeze echo "======================================================================" mkdir -p doc/build diff --git a/jenkins/scripts/run-pep8.sh b/jenkins/scripts/run-pep8.sh index aca3a011a6..09e71db554 100755 --- a/jenkins/scripts/run-pep8.sh +++ b/jenkins/scripts/run-pep8.sh @@ -14,12 +14,16 @@ # License for the specific language governing permissions and limitations # under the License. -tox -v -epep8 +venv=pep8 + +tox -v -e$venv rc=$? -echo "Begin pip freeze output from test virtualenv:" +[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip + +echo "Begin $freezecmd freeze output from test virtualenv:" echo "======================================================================" -.tox/pep8/bin/pip freeze +tox -e$venv -- $freezecmd freeze echo "======================================================================" exit $rc diff --git a/jenkins/scripts/run-selenium.sh b/jenkins/scripts/run-selenium.sh index 08993236b1..b0f959a826 100755 --- a/jenkins/scripts/run-selenium.sh +++ b/jenkins/scripts/run-selenium.sh @@ -2,7 +2,7 @@ # If a bundle file is present, call tox with the jenkins version of # the test environment so it is used. Otherwise, use the normal -# (non-bundle) test environment. Also, run pip freeze on the +# (non-bundle) test environment. 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. # @@ -21,9 +21,11 @@ result=$? pkill Xvfb 2>&1 > /dev/null set -e -echo "Begin pip freeze output from test virtualenv:" +[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip + +echo "Begin $freezecmd freeze output from test virtualenv:" echo "======================================================================" -.tox/$venv/bin/pip freeze +tox -e$venv -- $freezecmd freeze echo "======================================================================" exit $result diff --git a/jenkins/scripts/run-tox.sh b/jenkins/scripts/run-tox.sh index 94595cc883..cdc697efec 100755 --- a/jenkins/scripts/run-tox.sh +++ b/jenkins/scripts/run-tox.sh @@ -2,7 +2,7 @@ # If a bundle file is present, call tox with the jenkins version of # the test environment so it is used. Otherwise, use the normal -# (non-bundle) test environment. Also, run pip freeze on the +# (non-bundle) test environment. 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. # @@ -34,10 +34,11 @@ sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh pre tox -v -e$venv result=$? +[ -e .tox/$venv/bin/pbr ] && freezecmd=pbr || freezecmd=pip -echo "Begin pip freeze output from test virtualenv:" +echo "Begin $freezecmd freeze output from test virtualenv:" echo "======================================================================" -.tox/$venv/bin/pip freeze +tox -e$venv -- $freezecmd freeze echo "======================================================================" if [ -d ".testrepository" ] ; then