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
diff --git a/lib/tempest b/lib/tempest
index 96c9ced..ea5033a 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -607,8 +607,11 @@
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 @@
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