Fix tests which assume virtualenv
is available.
This commit is contained in:
parent
62d3ed0e2f
commit
8612b126a8
6 changed files with 16 additions and 27 deletions
|
@ -1,10 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
virtualenv --system-site-packages --python "${ANSIBLE_TEST_PYTHON_INTERPRETER}" "${OUTPUT_DIR}/venv"
|
||||
source "${OUTPUT_DIR}/venv/bin/activate"
|
||||
set -eux
|
||||
|
||||
source virtualenv.sh
|
||||
|
||||
# Requirements have to be installed prior to running ansible-playbook
|
||||
# because plugins and requirements are loaded before the task runs
|
||||
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# We don't set -u here, due to pypa/virtualenv#150
|
||||
set -ex
|
||||
set -eux
|
||||
|
||||
MYTMPDIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
|
||||
|
||||
trap 'rm -rf "${MYTMPDIR}"' EXIT
|
||||
|
||||
virtualenv --system-site-packages --python "${ANSIBLE_TEST_PYTHON_INTERPRETER}" "${MYTMPDIR}/jinja2"
|
||||
|
||||
source "${MYTMPDIR}/jinja2/bin/activate"
|
||||
source virtualenv.sh
|
||||
|
||||
pip install -U jinja2==2.9.4
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
set -eux
|
||||
|
||||
source virtualenv.sh
|
||||
|
||||
virtualenv --system-site-packages --python "${ANSIBLE_TEST_PYTHON_INTERPRETER:-python}" "${OUTPUT_DIR}/aws-ec2-inventory"
|
||||
source "${OUTPUT_DIR}/aws-ec2-inventory/bin/activate"
|
||||
pip install "python-dateutil>=2.1,<2.7.0" jmespath "Jinja2>=2.10" PyYaml cryptography paramiko
|
||||
|
||||
# create boto3 symlinks
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -ex
|
||||
virtualenv --system-site-packages --python "${ANSIBLE_TEST_PYTHON_INTERPRETER}" "${OUTPUT_DIR}/venv"
|
||||
source "${OUTPUT_DIR}/venv/bin/activate"
|
||||
set -eux
|
||||
|
||||
source virtualenv.sh
|
||||
|
||||
# Requirements have to be installed prior to running ansible-playbook
|
||||
# because plugins and requirements are loaded before the task runs
|
||||
pip install passlib
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# We don't set -u here, due to pypa/virtualenv#150
|
||||
set -ex
|
||||
set -eux
|
||||
|
||||
MYTMPDIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
|
||||
|
||||
trap 'rm -rf "${MYTMPDIR}"' EXIT
|
||||
|
||||
virtualenv --system-site-packages --python "${ANSIBLE_TEST_PYTHON_INTERPRETER}" "${MYTMPDIR}/jinja2"
|
||||
|
||||
source "${MYTMPDIR}/jinja2/bin/activate"
|
||||
source virtualenv.sh
|
||||
|
||||
pip install -U jinja2
|
||||
|
||||
|
|
5
test/runner/injector/virtualenv.sh
Normal file
5
test/runner/injector/virtualenv.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
# Create and activate a fresh virtual environment with `source virtualenv.sh`.
|
||||
|
||||
rm -rf "${OUTPUT_DIR}/venv"
|
||||
"${ANSIBLE_TEST_PYTHON_INTERPRETER}" -m virtualenv --system-site-packages --python "${ANSIBLE_TEST_PYTHON_INTERPRETER}" "${OUTPUT_DIR}/venv"
|
Loading…
Reference in a new issue