From c41a2d4423ef6d13df1ba554092f56e63e876fe5 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Tue, 16 Jul 2024 12:42:39 +0200 Subject: [PATCH] Add Alma support to all testcases --- xCAT-test/autotest/testcase/go_xcat/case3 | 16 ++++++++-------- .../reg_linux_statelite_installation_flat | 4 ++-- .../autotest/testcase/kdump/linux_diskless_kdump | 4 ++-- .../autotest/testcase/migration/redhat_migration | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/xCAT-test/autotest/testcase/go_xcat/case3 b/xCAT-test/autotest/testcase/go_xcat/case3 index a62653d026..b5d7062016 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case3 +++ b/xCAT-test/autotest/testcase/go_xcat/case3 @@ -18,8 +18,8 @@ check:output=~booted cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -#Install additional packages on Red Hat and Rocky -cmd:if xdsh $$CN "grep \"Red Hat\|Rocky\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi +#Install additional packages on Red Hat, Rocky and Alma +cmd:if xdsh $$CN "grep \"Red Hat\|Rocky\|Alma\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi #Install additional packages on Ubuntu cmd:if xdsh $$CN "grep \"Ubuntu\" /etc/*release >/dev/null"; then xdsh $$CN "DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg"; fi @@ -91,8 +91,8 @@ check:output=~booted cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -#Install additional packages on Red Hat and Rocky -cmd:if xdsh $$CN "grep \"Red Hat\|Rocky\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi +#Install additional packages on Red Hat, Rocky and Alma +cmd:if xdsh $$CN "grep \"Red Hat\|Rocky\|Alma\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi #Install additional packages on Ubuntu cmd:if xdsh $$CN "grep \"Ubuntu\" /etc/*release >/dev/null"; then xdsh $$CN "DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg"; fi @@ -135,8 +135,8 @@ check:output=~booted cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -#Install additional packages on Red Hat and Rocky -cmd:if xdsh $$CN "grep \"Red Hat\|Rocky\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi +#Install additional packages on Red Hat, Rocky and Alma +cmd:if xdsh $$CN "grep \"Red Hat\|Rocky\|Alma\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi #Install additional packages on Ubuntu cmd:if xdsh $$CN "grep \"Ubuntu\" /etc/*release >/dev/null"; then xdsh $$CN "DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg"; fi @@ -189,8 +189,8 @@ check:output=~booted cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" check:rc==0 -#Install additional packages on Red Hat and Rocky -cmd:if xdsh $$CN "grep \"Red Hat\|Rocky\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi +#Install additional packages on Red Hat, Rocky and Alma +cmd:if xdsh $$CN "grep \"Red Hat\|Rocky\|Alma\" /etc/*release >/dev/null"; then xdsh $$CN "yum install -y yum-utils dnf-utils bzip2"; fi #Install additional packages on Ubuntu cmd:if xdsh $$CN "grep \"Ubuntu\" /etc/*release >/dev/null"; then xdsh $$CN "DEBIAN_FRONTEND=noninteractive apt-get install -y gnupg"; fi diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat index 26e14e16d1..d3025d42ef 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -27,7 +27,7 @@ check:rc==0 #On SLES remove rh dependency dirs to free up disk space cmd:if [[ "$$OS" =~ "sle" ]]; then rm -rf /xcat-dep/rh*; fi -cmd:if cat /etc/*release |grep SUSE >/dev/null; then cp /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile_sles.csv /tmp/litefile.csv;tabrestore /tmp/litefile.csv; elif cat /etc/*release |grep "Red Hat\|Rocky" >/dev/null; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile.csv;fi +cmd:if cat /etc/*release |grep SUSE >/dev/null; then cp /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile_sles.csv /tmp/litefile.csv;tabrestore /tmp/litefile.csv; elif cat /etc/*release |grep "Red Hat\|Rocky\|Alma" >/dev/null; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile.csv;fi check:rc==0 cmd:tabdump litefile check:rc==0 @@ -40,7 +40,7 @@ cmd:cat /etc/exports|grep nodedata; if [ "$?" -ne "0" ]; then echo "/nodedata *( check:rc==0 cmd:cd /etc; export exports;cd - check:rc==0 -cmd:if cat /etc/*release |grep SUSE >/dev/null;then service nfsserver restart; elif cat /etc/*release |grep "Red Hat\|Rocky" >/dev/null;then if [ -f /usr/lib/systemd/system/nfs-server.service ]; then service nfs-server restart; else service nfs restart;fi; fi +cmd:if cat /etc/*release |grep SUSE >/dev/null;then service nfsserver restart; elif cat /etc/*release |grep "Red Hat\|Rocky\|Alma" >/dev/null;then if [ -f /usr/lib/systemd/system/nfs-server.service ]; then service nfs-server restart; else service nfs restart;fi; fi check:rc==0 cmd:chtab node=$$CN statelite.statemnt="$$MN:/nodedata" check:rc==0 diff --git a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump index b374ec095f..72d3f33f19 100644 --- a/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump +++ b/xCAT-test/autotest/testcase/kdump/linux_diskless_kdump @@ -23,7 +23,7 @@ cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arc check:rc==0 cmd:pkglistfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep pkglist|awk -F'=' '{print $2}'`;cp $pkglistfile $pkglistfile.bak -cmd:pkglistfile=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep pkglist|awk -F'=' '{print $2}'); if grep SUSE /etc/*release;then echo -e "kdump\nkexec-tools\nmakedumpfile\nat\n" >> $pkglistfile; elif grep -E "Red Hat|CentOS|Rocky" /etc/*release;then echo -e "kexec-tools\ncrash\nat\n" >> $pkglistfile; fi +cmd:pkglistfile=$(lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep pkglist|awk -F'=' '{print $2}'); if grep SUSE /etc/*release;then echo -e "kdump\nkexec-tools\nmakedumpfile\nat\n" >> $pkglistfile; elif grep -E "Red Hat|CentOS|Rocky|Alma" /etc/*release;then echo -e "kexec-tools\ncrash\nat\n" >> $pkglistfile; fi check:rc==0 cmd:exlistfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep exlist|awk -F'=' '{print $2}'`;cp $exlistfile $exlistfile.bak @@ -31,7 +31,7 @@ cmd:exlistfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arc check:rc==0 cmd:postinstallfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep postinstall|awk -F'=' '{print $2}'`;cp $postinstallfile $postinstallfile.bak -cmd:postinstallfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep postinstall|awk -F'=' '{print $2}'`; if grep SUSE /etc/*release;then sed -i "/\/tmp/ s/10/500/g" $postinstallfile; elif grep -E "Red Hat|CentOS|Rocky" /etc/*release;then sed -i /devpts/a"tmpfs /var/tmp tmpfs defaults,size=500m 0 2" $postinstallfile;fi +cmd:postinstallfile=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep postinstall|awk -F'=' '{print $2}'`; if grep SUSE /etc/*release;then sed -i "/\/tmp/ s/10/500/g" $postinstallfile; elif grep -E "Red Hat|CentOS|Rocky|Alma" /etc/*release;then sed -i /devpts/a"tmpfs /var/tmp tmpfs defaults,size=500m 0 2" $postinstallfile;fi check:rc==0 cmd:if [ ! -d /opt/xcat/share/xcat/tools/autotest/kdumpdir ]; then mkdir -p /opt/xcat/share/xcat/tools/autotest/kdumpdir && chmod 777 /opt/xcat/share/xcat/tools/autotest/kdumpdir; fi diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index d13e6f2b23..ec2cdfa721 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -26,7 +26,7 @@ cmd:makedhcp -a check:rc==0 cmd:service dhcpd restart check:rc==0 -cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat\|Rocky" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat\|Rocky\|Alma" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi check:output=~$$CN cmd:copycds $$ISO check:rc==0 @@ -135,7 +135,7 @@ cmd:makedhcp -a check:rc==0 cmd:service dhcpd restart check:rc==0 -cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat\|Rocky" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi +cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat\|Rocky\|Alma" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi check:output=~$$CN cmd:copycds $$ISO check:rc==0