From 9385c7eb4cf1b95f2dbb717afffc9d1535b40fa4 Mon Sep 17 00:00:00 2001 From: Jon-Paul Sullivan Date: Fri, 26 Sep 2014 15:42:25 +0100 Subject: [PATCH] Ensure tempest writes a full manifest The tempest element uses pip install after generating the manifest, meaning that it installs software not listed in its manifest. Fix it so that it writes the manifest after the last of these installs. Change-Id: I456d650c0bcba448cb18efad95e7daeccd5d9e0b --- elements/tempest/install.d/51-tempest | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/elements/tempest/install.d/51-tempest b/elements/tempest/install.d/51-tempest index a7cdaf2f7..f66650c0e 100755 --- a/elements/tempest/install.d/51-tempest +++ b/elements/tempest/install.d/51-tempest @@ -1,19 +1,38 @@ #!/usr/bin/env bash -set -ex +set -eux +set -o pipefail install-packages augeas-tools os-svc-install $TEMPEST_EXTRA_INSTALL_OPTS -i "$TEMPEST_VENV_DIR" -u tempest -r /opt/stack/tempest +set +u source $TEMPEST_VENV_DIR/bin/activate +set -u + cd /opt/stack/tempest # bug #1293812 : Avoid easy_install triggering on pbr. pip install -U 'pbr>=0.5.21,<1.0' pip install -r test-requirements.txt + +# Fix for creating and using a pip manifest correctly +name=$(basename $TEMPEST_VENV_DIR) +svc_manifest=$(get-pip-manifest $name) +if [ -n "$svc_manifest" ]; then + use-pip-manifest $svc_manifest +else + write-pip-manifest $name +fi + testr init +# Deactivate the virtualenv after use +set +u +deactivate +set -u + # soft link testr into PATH so we can use it directly in run-tempest ln -sf $TEMPEST_VENV_DIR/bin/testr /usr/local/bin/testr