Browse code

Merge "Use common tempest tox venv and add plugin install variable"

Jenkins authored on 2016/05/10 10:47:13
Showing 1 changed files
... ...
@@ -64,6 +64,10 @@ BUILD_TIMEOUT=${BUILD_TIMEOUT:-196}
64 64
 # have tempest installed in DevStack by default.
65 65
 INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"}
66 66
 
67
+# This variable is passed directly to pip install inside the common tox venv
68
+# that is created
69
+TEMPEST_PLUGINS=${TEMPEST_PLUGINS:-0}
70
+
67 71
 # Cinder/Volume variables
68 72
 TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
69 73
 TEMPEST_DEFAULT_VOLUME_VENDOR="Open Source"
... ...
@@ -517,17 +521,17 @@ function configure_tempest {
517 517
     tmp_cfg_file=$(mktemp)
518 518
     cd $TEMPEST_DIR
519 519
     if [[ "$OFFLINE" != "True" ]]; then
520
-        tox -revenv --notest
520
+        tox -revenv-tempest --notest
521 521
     fi
522
-    tox -evenv -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
522
+    tox -evenv-tempest -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
523 523
 
524 524
     # Auth:
525 525
     iniset $TEMPEST_CONFIG auth tempest_roles "Member"
526 526
     if [[ $TEMPEST_USE_TEST_ACCOUNTS == "True" ]]; then
527 527
         if [[ $TEMPEST_HAS_ADMIN == "True" ]]; then
528
-            tox -evenv -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml
528
+            tox -evenv-tempest -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml
529 529
         else
530
-            tox -evenv -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml
530
+            tox -evenv-tempest -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml
531 531
         fi
532 532
         iniset $TEMPEST_CONFIG auth use_dynamic_credentials False
533 533
         iniset $TEMPEST_CONFIG auth test_accounts_file "etc/accounts.yaml"
... ...
@@ -592,12 +596,10 @@ function install_tempest {
592 592
     # NOTE(mtreinish) Respect constraints in the tempest full venv, things that
593 593
     # are using a tox job other than full will not be respecting constraints but
594 594
     # running pip install -U on tempest requirements
595
-    if [[ -d .tox/tempest ]] ; then
596
-        $TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
597
-        PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
598
-    else
599
-        $TEMPEST_DIR/.tox/full/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
600
-        PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/full
595
+    $TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
596
+    PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
597
+    if [[ $TEMPEST_PLUGINS != 0 ]] ; then
598
+        tox -evenv-tempest -- pip install $TEMPEST_PLUGINS
601 599
     fi
602 600
     popd
603 601
 }