Browse code

Dump the upper constraints for tempest in a temporary file

This will avoid the creation of an unneeded file in the "tempest"
repository directory.

TrivialFix

Change-Id: Id3f46b3537cd3232cb29c42808bde44c667565f1

Rodolfo Alonso Hernandez authored on 2019/11/04 20:37:54
Showing 1 changed files
... ...
@@ -607,8 +607,11 @@ function configure_tempest {
607 607
     fi
608 608
 
609 609
     # The requirements might be on a different branch, while tempest needs master requirements.
610
-    (cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > u-c-m.txt
611
-    tox -evenv-tempest -- pip install -c u-c-m.txt -r requirements.txt
610
+    local tmp_u_c_m
611
+    tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX)
612
+    (cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > $tmp_u_c_m
613
+    tox -evenv-tempest -- pip install -c $tmp_u_c_m -r requirements.txt
614
+    rm -f $tmp_u_c_m
612 615
 
613 616
     # Auth:
614 617
     iniset $TEMPEST_CONFIG auth tempest_roles "member"
... ...
@@ -697,8 +700,11 @@ function install_tempest_plugins {
697 697
     pushd $TEMPEST_DIR
698 698
     if [[ $TEMPEST_PLUGINS != 0 ]] ; then
699 699
         # The requirements might be on a different branch, while tempest & tempest plugins needs master requirements.
700
-        (cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > u-c-m.txt
701
-        tox -evenv-tempest -- pip install -c u-c-m.txt $TEMPEST_PLUGINS
700
+        local tmp_u_c_m
701
+        tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX)
702
+        (cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > $tmp_u_c_m
703
+        tox -evenv-tempest -- pip install -c $tmp_u_c_m $TEMPEST_PLUGINS
704
+        rm -f $tmp_u_c_m
702 705
         echo "Checking installed Tempest plugins:"
703 706
         tox -evenv-tempest -- tempest list-plugins
704 707
     fi