[ansible-test] nuke virtualenv-isolated.sh

Change:
- This isn't used in our tests, so the suggestion was to just remove
  it.

Signed-off-by: Rick Elrod <rick@elrod.me>
This commit is contained in:
Rick Elrod 2021-04-12 16:15:59 -05:00 committed by Matt Clay
parent 481c036632
commit f38d03f6fb
2 changed files with 2 additions and 18 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- ansible-test - virtualenv-isolated.sh is no longer provided. Prefer virtualenv.sh in its place.

View file

@ -1,18 +0,0 @@
#!/usr/bin/env bash
# Create and activate a fresh virtual environment with `source virtualenv-isolated.sh`.
rm -rf "${OUTPUT_DIR}/venv"
# Try to use 'venv' if it is available, then fallback to 'virtualenv' since some systems provide 'venv' although it is non-functional.
if [[ "${ANSIBLE_TEST_PYTHON_VERSION}" =~ ^2\. ]] || ! "${ANSIBLE_TEST_PYTHON_INTERPRETER}" -m venv "${OUTPUT_DIR}/venv" > /dev/null 2>&1; then
rm -rf "${OUTPUT_DIR}/venv"
"${ANSIBLE_TEST_PYTHON_INTERPRETER}" -m virtualenv --python "${ANSIBLE_TEST_PYTHON_INTERPRETER}" "${OUTPUT_DIR}/venv"
fi
set +ux
source "${OUTPUT_DIR}/venv/bin/activate"
set -ux
if [[ "${ANSIBLE_TEST_COVERAGE}" ]]; then
pip install coverage -c ../../../runner/requirements/constraints.txt --disable-pip-version-check
fi