From 8579f583077e5df3358605e4cdfe418b1d46f53b Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Mon, 4 Nov 2019 11:37:54 +0000 Subject: [PATCH] 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 --- lib/tempest | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/tempest b/lib/tempest index 96c9ced14a..ea5033a29d 100644 --- a/lib/tempest +++ b/lib/tempest @@ -607,8 +607,11 @@ function configure_tempest { fi # The requirements might be on a different branch, while tempest needs master requirements. - (cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > u-c-m.txt - tox -evenv-tempest -- pip install -c u-c-m.txt -r requirements.txt + local tmp_u_c_m + tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX) + (cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > $tmp_u_c_m + tox -evenv-tempest -- pip install -c $tmp_u_c_m -r requirements.txt + rm -f $tmp_u_c_m # Auth: iniset $TEMPEST_CONFIG auth tempest_roles "member" @@ -697,8 +700,11 @@ function install_tempest_plugins { pushd $TEMPEST_DIR if [[ $TEMPEST_PLUGINS != 0 ]] ; then # The requirements might be on a different branch, while tempest & tempest plugins needs master requirements. - (cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > u-c-m.txt - tox -evenv-tempest -- pip install -c u-c-m.txt $TEMPEST_PLUGINS + local tmp_u_c_m + tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX) + (cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > $tmp_u_c_m + tox -evenv-tempest -- pip install -c $tmp_u_c_m $TEMPEST_PLUGINS + rm -f $tmp_u_c_m echo "Checking installed Tempest plugins:" tox -evenv-tempest -- tempest list-plugins fi