You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2020/09/15 16:57:25 UTC
[trafficserver] branch 9.0.x updated: AuTest: Reuse venv if it
exists already (#7178)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 30ae230 AuTest: Reuse venv if it exists already (#7178)
30ae230 is described below
commit 30ae2302de2d069f0da396d444e7c2124029630d
Author: Brian Neradt <br...@gmail.com>
AuthorDate: Fri Sep 11 14:29:42 2020 -0500
AuTest: Reuse venv if it exists already (#7178)
Before this change, every call to autest.sh would re-install the pipenv
virtual environment. This reuses the virtual environment on subsequent
runs to autest.sh.
(cherry picked from commit 3cfebc9b8129e24e55309588b6e77959f4a49cf0)
---
tests/test-env-check.sh | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tests/test-env-check.sh b/tests/test-env-check.sh
index 7087964..d280d2d 100755
--- a/tests/test-env-check.sh
+++ b/tests/test-env-check.sh
@@ -42,10 +42,15 @@ fi
# check for pipenv
pipenv --version &> /dev/null
-if [ $? = 0 ]; then
+if [ $? -eq 0 ]; then
echo "pipenv detected!"
- pipenv install
- # pipenv shell
+ pipenv --venv &> /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Installing a new virtual environment via pipenv"
+ pipenv install
+ else
+ echo "Using the pre-existing virtual environment."
+ fi
else
echo "pipenv is not installed/enabled. "
fi