From 27f70c96ac02b72d43b15a8ea657deedfe044fe5 Mon Sep 17 00:00:00 2001 From: OpenStack Proposal Bot Date: Tue, 22 Aug 2017 20:08:44 +0000 Subject: [PATCH] Updated from OpenStack Ansible Tests Change-Id: I49db38a4ef655463c7f1088a4c9bdafec5b24440 --- bindep.txt | 3 +-- run_tests.sh | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bindep.txt b/bindep.txt index 2b8d4ff..d3ead94 100644 --- a/bindep.txt +++ b/bindep.txt @@ -54,8 +54,7 @@ python-pyasn1 [platform:dpkg platform:suse] python-openssl [platform:dpkg] python-ndg-httpsclient [platform:ubuntu !platform:ubuntu-14] python2-pyasn1 [platform:redhat] -python2-pyOpenSSL [platform:redhat !platform:fedora] -pyOpenSSL [platform:fedora] +pyOpenSSL [platform:redhat] python-pyOpenSSL [platform:opensuseproject-42] python2-pyOpenSSL [platform:suse !platform:opensuseproject-42] python-ndg_httpsclient [platform:redhat !platform:fedora] diff --git a/run_tests.sh b/run_tests.sh index 969e3db..e8f6f3a 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -35,9 +35,12 @@ source /etc/os-release || source /usr/lib/os-release install_pkg_deps() { pkg_deps="git" + # Prefer dnf over yum for CentOS. + which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum' + case ${ID,,} in *suse*) pkg_mgr_cmd="zypper -n in" ;; - centos|rhel) pkg_mgr_cmd="yum install -y" ;; + centos|rhel) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;; fedora) pkg_mgr_cmd="dnf -y install" ;; ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;; *) echo "unsupported distribution: ${ID,,}"; exit 1 ;;