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
This commit is contained in:
Jon-Paul Sullivan 2014-09-26 15:42:25 +01:00
parent 7608c59da9
commit 9385c7eb4c
1 changed files with 20 additions and 1 deletions

View File

@ -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