Browse code

Use common tempest tox venv and add plugin install variable

This commit adds a new variable to lib/tempest to provide the plugins
that should be installed into common tox venv that gets created. In
order to make this work the workarounds to handle migrating to a common
tox venv have to be removed otherwise the plugins could be installed in
a venv that isn't used. This also removes the constrained installation
steps, as the constraints packaged on liberty will eventually conflict
with what tempest actually requires since tempest follows master
requirements and constraints.

Change-Id: I63658b8d8dfa999e0feb79f8f2968f2b32e3ff57
Depends-On: Iab2e6e04b6c5795a4d0c8214564106525b942308
(cherry picked from commit 440464ccbbaf33e4687bd9fece5e1de64542f263)
(cherry picked from commit a47398ffee52f2c6fd5ced4bfb13a38132adb51e)

Matthew Treinish authored on 2016/05/05 00:55:12
Showing 1 changed files
... ...
@@ -71,6 +71,10 @@ INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"}
71 71
 BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-${CIRROS_VERSION}"
72 72
 BOTO_CONF=/etc/boto.cfg
73 73
 
74
+# This variable is passed directly to pip install inside the common tox venv
75
+# that is created
76
+TEMPEST_PLUGINS=${TEMPEST_PLUGINS:-0}
77
+
74 78
 # Cinder/Volume variables
75 79
 TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
76 80
 TEMPEST_DEFAULT_VOLUME_VENDOR="Open Source"
... ...
@@ -374,7 +378,7 @@ function configure_tempest {
374 374
     # NOTE(mtreinish): This must be done after auth settings are added to the tempest config
375 375
     local tmp_cfg_file=$(mktemp)
376 376
     cd $TEMPEST_DIR
377
-    tox -revenv -- verify-tempest-config -u -r -o $tmp_cfg_file
377
+    tox -revenv-tempest -- verify-tempest-config -u -r -o $tmp_cfg_file
378 378
 
379 379
     local compute_api_extensions=${COMPUTE_API_EXTENSIONS:-"all"}
380 380
     if [[ ! -z "$DISABLE_COMPUTE_API_EXTENSIONS" ]]; then
... ...
@@ -620,15 +624,9 @@ function install_tempest {
620 620
     pip_install tox
621 621
     pushd $TEMPEST_DIR
622 622
     tox --notest -efull
623
-    # NOTE(mtreinish) Respect constraints in the tempest full venv, things that
624
-    # are using a tox job other than full will not be respecting constraints but
625
-    # running pip install -U on tempest requirements
626
-    if [[ -d .tox/tempest ]] ; then
627
-        $TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
628
-        PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
629
-    else
630
-        $TEMPEST_DIR/.tox/full/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
631
-        PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/full
623
+    PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
624
+    if [[ $TEMPEST_PLUGINS != 0 ]] ; then
625
+        tox -evenv-tempest -- pip install $TEMPEST_PLUGINS
632 626
     fi
633 627
     install_tempest_lib
634 628
     popd