Activate virtual environment
Enable virtualenv after installation. Without it, python packages from system location will be used. So if bindep is not installed in system packages the failure will be as ~/tripleo-validations/scripts/..//scripts/bindep-install: line 37: bindep: command not found This patch activates virtualenv after creation on previous step in accordance rather than before pytest. Change-Id: I3725bf64bead30b02f10eb9a68d220c4e422b531
This commit is contained in:
parent
ec24e3ed7a
commit
52c72cc2f2
|
@ -47,6 +47,9 @@ sudo touch /etc/ci/mirror_info.sh
|
|||
# Create a virtual env
|
||||
"${PYTHON_EXEC}" -m virtualenv --system-site-packages "${HOME}/test-python"
|
||||
|
||||
# Activate a virtual env
|
||||
PS1="[\u@\h \W]\$" source "${HOME}/test-python/bin/activate"
|
||||
|
||||
# Run bindep
|
||||
"${HOME}/test-python/bin/pip" install "pip>=19.1.1" setuptools bindep --upgrade
|
||||
"${PROJECT_DIR}/scripts/bindep-install"
|
||||
|
@ -61,7 +64,6 @@ fi
|
|||
-r "${PROJECT_DIR}/molecule-requirements.txt"
|
||||
|
||||
# Run local test
|
||||
PS1="[\u@\h \W]\$" source "${HOME}/test-python/bin/activate"
|
||||
source "${PROJECT_DIR}/ansible-test-env.rc"
|
||||
export ANSIBLE_ROLES_PATH="${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
|
||||
ansible-playbook -i "${PROJECT_DIR}/tests/hosts.ini" \
|
||||
|
|
Loading…
Reference in New Issue