Merge "Pin version of tox used for Centos-7 tests"

This commit is contained in:
Zuul 2020-03-06 17:53:08 +00:00 committed by Gerrit Code Review
commit 1d21a35fad

View File

@ -51,7 +51,11 @@ case "${ID,,}" in
pkg_list="ca-certificates-mozilla python-devel python-xml lsb-release ${extra_suse_deps:-}"
;;
amzn|centos|rhel)
pkg_list="python-devel redhat-lsb-core yum-utils"
# NOTE(jrosser) on centos7 we ensure that the distro version of virtualenv is present to avoid
# tox later installing virtualenv as a dependancy with pip, and breaking later tests with
# openstack_hosts which correctly install the python-virtualenv distro package
[[ "${VERSION_ID}" == "7" ]] && extra_redhat_deps="python-virtualenv"
pkg_list="python-devel redhat-lsb-core yum-utils ${extra_redhat_deps:-}"
;;
fedora)
pkg_list="python-devel redhat-lsb-core redhat-rpm-config yum-utils"
@ -82,7 +86,11 @@ if ! which pip &>/dev/null; then
fi
# Install bindep and tox
sudo pip install 'bindep>=2.4.0' tox
if [[ "${ID,,}" == "centos" ]] && [[ ${VERSION_ID} == "7" ]]; then
sudo pip install 'bindep>=2.4.0' 'tox<=3.14.0'
else
sudo pip install 'bindep>=2.4.0' tox
fi
if [[ "${ID,,}" == "fedora" ]]; then
sudo dnf -y install redhat-lsb-core yum-utils