Fix package installs in run_tests.sh for RHEL 8

Some packages we always install in run_tests.sh are either not present
in RHEL 8, or need to be named differently.

Change-Id: I14b98e8a4d237bed77581ae4364351913234c9ba
This commit is contained in:
Javier Pena 2019-02-14 15:04:49 +01:00
parent 7f70f691d7
commit d84fd14687
1 changed files with 13 additions and 3 deletions

View File

@ -144,12 +144,9 @@ fi
# Install dependencies
$SUDO $PKG_MGR -y install puppet \
yum-plugin-priorities \
iproute \
dstat \
python-setuptools \
openssl-devel \
python-devel \
libffi-devel \
libxml2-devel \
libxslt-devel \
@ -167,6 +164,19 @@ $SUDO $PKG_MGR -y install puppet \
subversion \
systemtap
# Some dependencies are not installed on RHEL/CentOS 8, or are renamed
OS_NAME=$(facter operatingsystem)
OS_VERSION=$(facter operatingsystemmajrelease)
if ([ "$OS_NAME" = "RedHat" ] || [ "$OS_NAME" = "CentOS" ]) && [ $OS_VERSION -gt 7 ]; then
$SUDO $PKG_MGR -y install python3-setuptools \
python3-devel
else
$SUDO $PKG_MGR -y install python-setuptools \
python-devel \
yum-plugin-priorities
fi
# Don't assume pip is installed
which pip || $SUDO easy_install pip