From 7e603d1bf8689a50ffa3dd93c901a71ea5f5ae36 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 1 Jun 2016 18:16:14 -0400 Subject: [PATCH] Move tempest plugin install to the end For the tempest plugin install inside the tox venv to hold we need to ensure that it's the last thing run that touches the tox venv before devstack ends. Otherwise there is a chance we'll recreate the venv in a later step of installing and configuring tempest. This commit moves the plugin installation into it's own function and calls that function as last phase of the tempest setup to make sure it runs last. Change-Id: Ie253171537e8c5a9887cc30aba1cad4b31e57663 --- extras.d/80-tempest.sh | 2 ++ lib/tempest | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/extras.d/80-tempest.sh b/extras.d/80-tempest.sh index fcf79bd4d9..6a3d121497 100644 --- a/extras.d/80-tempest.sh +++ b/extras.d/80-tempest.sh @@ -13,6 +13,8 @@ if is_service_enabled tempest; then elif [[ "$1" == "stack" && "$2" == "extra" ]]; then echo_summary "Initializing Tempest" configure_tempest + echo_summary "Installing Tempest Plugins" + install_tempest_plugins elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then # local.conf Tempest option overrides : diff --git a/lib/tempest b/lib/tempest index 6f8e29395c..c492182fee 100644 --- a/lib/tempest +++ b/lib/tempest @@ -600,6 +600,12 @@ function install_tempest { # running pip install -U on tempest requirements $TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest + popd +} + +# install_tempest_plugins() - Install any specified plugins into the tempest venv +function install_tempest_plugins { + pushd $TEMPEST_DIR if [[ $TEMPEST_PLUGINS != 0 ]] ; then tox -evenv-tempest -- pip install $TEMPEST_PLUGINS echo "Checking installed Tempest plugins:"