diff --git a/doc/source/contributing/developer_guide.rst b/doc/source/contributing/developer_guide.rst index f38ca4593..2e90a44ee 100644 --- a/doc/source/contributing/developer_guide.rst +++ b/doc/source/contributing/developer_guide.rst @@ -754,6 +754,7 @@ To use this script execute the following command. .. code-block:: console + $ cd tripleo-validations $ ./scripts/run-local-test ${NEWROLENAME} When using the `run-local-test` script, the TRIPLEO_JOB_ANSIBLE_ARGS diff --git a/scripts/run-local-test b/scripts/run-local-test index 168c9f52b..799f9b08a 100755 --- a/scripts/run-local-test +++ b/scripts/run-local-test @@ -40,12 +40,11 @@ set -xeuo # Source distribution information source /etc/os-release || source /usr/lib/os-release RHT_PKG_MGR=$(command -v dnf || command -v yum) -PYTHON_EXEC=$(command -v python3 || command -v python) # Install the one requirement we need to run any local test case "${ID,,}" in amzn|rhel|centos|fedora) - sudo "${RHT_PKG_MGR}" install -y python*-virtualenv + sudo "${RHT_PKG_MGR}" install -y python3 python*-virtualenv ;; esac @@ -53,6 +52,9 @@ esac sudo mkdir -p /etc/ci sudo touch /etc/ci/mirror_info.sh +# Get Python Executable +PYTHON_EXEC=$(command -v python3 || command -v python) + # Create a virtual env "${PYTHON_EXEC}" -m virtualenv --system-site-packages "${HOME}/test-python"