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
(cherry picked from commit 7e603d1bf8689a50ffa3dd93c901a71ea5f5ae36)

Matthew Treinish authored on 2016/06/02 07:16:14
Showing 2 changed files
... ...
@@ -14,6 +14,8 @@ if is_service_enabled tempest; then
14 14
         echo_summary "Initializing Tempest"
15 15
         configure_tempest
16 16
         init_tempest
17
+        echo_summary "Installing Tempest Plugins"
18
+        install_tempest_plugins
17 19
     elif [[ "$1" == "stack" && "$2" == "post-extra" ]]; then
18 20
         # local.conf Tempest option overrides
19 21
         :
... ...
@@ -636,6 +636,12 @@ function install_tempest {
636 636
     pushd $TEMPEST_DIR
637 637
     tox --notest -efull
638 638
     PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
639
+    popd
640
+}
641
+
642
+# install_tempest_plugins() - Install any specified plugins into the tempest venv
643
+function install_tempest_plugins {
644
+    pushd $TEMPEST_DIR
639 645
     if [[ $TEMPEST_PLUGINS != 0 ]] ; then
640 646
         tox -evenv-tempest -- pip install $TEMPEST_PLUGINS
641 647
     fi