Skip to content

Commit

Permalink
Merge pull request #7333 from gurevichmark/Alma_testcases2
Browse files Browse the repository at this point in the history
Additional testcase changes for AlmaLinux
  • Loading branch information
besawn committed Feb 6, 2023
2 parents 5cda3b6 + 369683e commit 9b6dab9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions xCAT-test/autotest/testcase/installation/SN_setup_case
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ check:rc==0
cmd:cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-core && createrepo .
check:rc==0

cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";path2="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "rocky" ]];then path="rocky";path2="rh";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path2$ver/__GETNODEATTR($$SN,arch)__ && createrepo .;
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";path2="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "rocky" ]];then path="rocky";path2="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "alma" ]];then path="alma";path2="rh";fi; ver="__GETNODEATTR($$SN,os)__"; tmp=${ver%%.*};ver=`echo "$tmp"|sed 's:[a-zA-Z]::g'`;cd /install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__/xcat/xcat-dep/$path2$ver/__GETNODEATTR($$SN,arch)__ && createrepo .;
check:rc==0

cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkgdir=/install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__
check:rc==0

cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";elif [[ " __GETNODEATTR($$SN,os)__" =~ "rocky" ]];then path="rocky";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then path="sles";elif [[ "__GETNODEATTR($$SN,os)__" =~ "ol" ]];then path="ol";elif [[ "__GETNODEATTR($$SN,os)__" =~ "rocky" ]];then path="rocky";elif [[ "__GETNODEATTR($$SN,os)__" =~ "alma" ]];then path="alma";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;
check:rc==0

#add support python in sn
Expand Down Expand Up @@ -100,7 +100,7 @@ check:output=~IMAGENAME=__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-inst
cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then xdsh $$SN "rpm -qa|grep xCAT-openbmc-py";else echo "There is no xCAT-openbmc-py installed in MN, skip check xCAT-openbmc-py installation in SN"; exit 0;fi
check:rc==0
cmd:xdsh $$SN "cat /var/log/xcat/xcat.log"
cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" || "__GETNODEATTR($$SN,os)__" =~ "ol" || "__GETNODEATTR($$SN,os)__" =~ "rocky" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi
cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if [[ "__GETNODEATTR($$SN,os)__" =~ "sle" ]];then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif [[ "__GETNODEATTR($$SN,os)__" =~ "rh" || "__GETNODEATTR($$SN,os)__" =~ "ol" || "__GETNODEATTR($$SN,os)__" =~ "rocky" || "__GETNODEATTR($$SN,os)__" =~ "alma" ]];then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi
check:rc==0
cmd:makentp -a
check:rc==0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ cmd:lsdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netb
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0

#Make sure squashfs-tools rpm is installed on RHEL, OL and Rocky
cmd:if [[ "$$OS" =~ "rhel" || "$$OS" =~ "ol" || "$$OS" =~ "rocky" ]]; then yum install -y squashfs-tools; fi
#Make sure squashfs-tools rpm is installed on RHEL, OL, Rocky and Alma
cmd:if [[ "$$OS" =~ "rhel" || "$$OS" =~ "ol" || "$$OS" =~ "rocky" || "$$OS" =~ "alma" ]]]; then yum install -y squashfs-tools; fi

#Make sure squashfs-tools rpm is installed on Ubuntu
cmd:if [[ "$$OS" =~ "ubuntu" ]]; then apt-get install -y squashfs-tools; fi
Expand Down
2 changes: 1 addition & 1 deletion xCAT-test/autotest/testcase/passwd/case0
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ check:rc==0
cmd:if grep Ubuntu /etc/*release;then if [ ! -e /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot/initrd.gz ]; then copycds $$ISO;mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot/;touch /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot/initrd.gz;fi;fi
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
cmd:if grep SUSE /etc/*release;then grep '\$6\$' /install/autoinst/$$CN | awk 'gsub(/^ *| *$/,"")'| awk -v head="<user_password>" -v tail="</user_password>" '{print substr($0, index($0,head)+length(head),index($0,tail)-index($0,head)-length(head))}' > /tmp/instcryptedpasswd; elif grep -E "Red Hat|CentOS|Rocky" /etc/*release;then grep '\$6\$' /install/autoinst/$$CN |awk -F " " '{print $3}' > /tmp/instcryptedpasswd; elif grep Ubuntu /etc/*release;then grep '\$6\$' /install/autoinst/$$CN |awk -F " " '{print $4}' > /tmp/instcryptedpasswd;else echo "Sorry,this is not supported os"; fi
cmd:if grep SUSE /etc/*release;then grep '\$6\$' /install/autoinst/$$CN | awk 'gsub(/^ *| *$/,"")'| awk -v head="<user_password>" -v tail="</user_password>" '{print substr($0, index($0,head)+length(head),index($0,tail)-index($0,head)-length(head))}' > /tmp/instcryptedpasswd; elif grep -E "Red Hat|CentOS|Rocky|Alma" /etc/*release;then grep '\$6\$' /install/autoinst/$$CN |awk -F " " '{print $3}' > /tmp/instcryptedpasswd; elif grep Ubuntu /etc/*release;then grep '\$6\$' /install/autoinst/$$CN |awk -F " " '{print $4}' > /tmp/instcryptedpasswd;else echo "Sorry,this is not supported os"; fi
check:rc==0
cmd:diff /tmp/tmpcryptedpasswd /tmp/instcryptedpasswd
check:rc==0
Expand Down

0 comments on commit 9b6dab9

Please sign in to comment.