Fix script indent to 4 spaces
[releng/global-jjb.git] / shell / tox-run.sh
index 6b45116..3f1f92a 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -l
 # SPDX-License-Identifier: EPL-1.0
 ##############################################################################
 # Copyright (c) 2017 The Linux Foundation and others.
@@ -10,9 +10,6 @@
 ##############################################################################
 echo "---> tox-run.sh"
 
-# shellcheck source=/tmp/v/tox/bin/activate disable=SC1091
-source "/tmp/v/tox/bin/activate"
-
 # Ensure we fail the job if any steps fail.
 # DO NOT set -u as virtualenv's activate script has unbound variables
 set -e -o pipefail
@@ -27,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}"