summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2022-03-03 15:11:59 -0500
committerafariasa <afariasa@redhat.com>2022-07-13 14:08:03 +0000
commit9a7028f02cbdfe034b98f524c1bc8c497f14e423 (patch)
tree09a3a8cebee55654b4cbdffc865eb8f0722d451b /tools
parentde65131f92ba5ba812e33e6ff63be0991687413a (diff)
downloadnova-9a7028f02cbdfe034b98f524c1bc8c497f14e423.tar.gz
Test setting the nova job to centos-9-stream
Depends-On: https://review.opendev.org/c/openstack/tempest/+/831607 Change-Id: Ic8da6ee0313a911d742190ea5b0d4362cb6aef2f
Diffstat (limited to 'tools')
-rwxr-xr-xtools/test-setup.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/test-setup.sh b/tools/test-setup.sh
index 96a08c4a98..fced9be5e0 100755
--- a/tools/test-setup.sh
+++ b/tools/test-setup.sh
@@ -27,13 +27,19 @@ function is_rhel8 {
cat /etc/*release | grep -q 'release 8'
}
+function is_rhel9 {
+ [ -f /usr/bin/dnf ] && \
+ cat /etc/*release | grep -q -e "Red Hat" -e "CentOS" -e "CloudLinux" && \
+ cat /etc/*release | grep -q 'release 9'
+}
+
function set_conf_line { # file regex value
sudo sh -c "grep -q -e '$2' $1 && \
sed -i 's|$2|$3|g' $1 || \
echo '$3' >> $1"
}
-if is_rhel7 || is_rhel8; then
+if is_rhel7 || is_rhel8 || is_rhel9; then
# mysql needs to be started on centos/rhel
sudo systemctl restart mariadb.service