Pass PYTHONPATH to tox env to fix install issues 09/14009/2
authorEric Ball <eball@linuxfoundation.org>
Sat, 15 Dec 2018 01:20:49 +0000 (17:20 -0800)
committerEric Ball <eball@linuxfoundation.org>
Sat, 15 Dec 2018 01:31:18 +0000 (17:31 -0800)
We have seen install issues that only seem to happen on build
machines. The reason these problems do not appear on local builds is
still not clear, but passing in the PYTHONPATH (set to the working
directory) is an innocuous change that fixes the problem.

Change-Id: I70217404b5a1f993d233714e2e1cac4ae9e7fd2d
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
shell/tox-run.sh

index 4738001..3f1f92a 100644 (file)
@@ -24,6 +24,11 @@ if [ -d "/opt/pyenv" ]; then
     export PATH="$PYENV_ROOT/bin:$PATH"
 fi
 
+# Set and pass in PYTHONPATH to circumvent installation bug in tox>=3.2.0
+PYTHONPATH=$(pwd)
+export PYTHONPATH
+export TOX_TESTENV_PASSENV=PYTHONPATH
+
 set +e  # Allow detox to fail so that we can collect the logs in the next step
 
 PARALLEL="${PARALLEL:-true}"