Browse code

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

Matthew Treinish authored on 2016/06/02 07:16:14
Showing 2 changed files
... ...
@@ -13,6 +13,8 @@ if is_service_enabled tempest; then
13 13
     elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
14 14
         echo_summary "Initializing Tempest"
15 15
         configure_tempest
16
+        echo_summary "Installing Tempest Plugins"
17
+        install_tempest_plugins
16 18
     elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
17 19
         # local.conf Tempest option overrides
18 20
         :
... ...
@@ -600,6 +600,12 @@ function install_tempest {
600 600
     # running pip install -U on tempest requirements
601 601
     $TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
602 602
     PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
603
+    popd
604
+}
605
+
606
+# install_tempest_plugins() - Install any specified plugins into the tempest venv
607
+function install_tempest_plugins {
608
+    pushd $TEMPEST_DIR
603 609
     if [[ $TEMPEST_PLUGINS != 0 ]] ; then
604 610
         tox -evenv-tempest -- pip install $TEMPEST_PLUGINS
605 611
         echo "Checking installed Tempest plugins:"