Browse Source

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
Javier Pena 2 months ago
parent
commit
d84fd14687
1 changed files with 13 additions and 3 deletions
  1. 13
    3
      run_tests.sh

+ 13
- 3
run_tests.sh View File

@@ -144,12 +144,9 @@ fi
144 144
 
145 145
 # Install dependencies
146 146
 $SUDO $PKG_MGR -y install puppet \
147
-                     yum-plugin-priorities \
148 147
                      iproute \
149 148
                      dstat \
150
-                     python-setuptools \
151 149
                      openssl-devel \
152
-                     python-devel \
153 150
                      libffi-devel \
154 151
                      libxml2-devel \
155 152
                      libxslt-devel \
@@ -167,6 +164,19 @@ $SUDO $PKG_MGR -y install puppet \
167 164
                      subversion \
168 165
                      systemtap
169 166
 
167
+# Some dependencies are not installed on RHEL/CentOS 8, or are renamed
168
+OS_NAME=$(facter operatingsystem)
169
+OS_VERSION=$(facter operatingsystemmajrelease)
170
+
171
+if ([ "$OS_NAME" = "RedHat" ] || [ "$OS_NAME" = "CentOS" ]) && [ $OS_VERSION -gt 7 ]; then
172
+    $SUDO $PKG_MGR -y install python3-setuptools \
173
+                              python3-devel
174
+else
175
+    $SUDO $PKG_MGR -y install python-setuptools \
176
+                              python-devel \
177
+                              yum-plugin-priorities
178
+fi
179
+
170 180
 # Don't assume pip is installed
171 181
 which pip || $SUDO easy_install pip
172 182
 

Loading…
Cancel
Save