2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-20 10:10:22 +00:00
Files
xcat-core/xCAT-test/autotest/testcase/go_xcat/case3
2020-03-26 11:10:35 -04:00

195 lines
7.8 KiB
Plaintext

start:go_xcat_devel_from_repo
description:test go-xcat devel on a newly provisioned node
label:go_xcat
os:Linux
#Make sure service node is not off, if it is, power it on
cmd:if rpower $$SN stat | grep "off"; then rpower $$SN on; sleep 300; fi
#Service not did not boot after 5 min, reprovision it
cmd:if lsdef $$SN -i status -c | grep -v "booted"; then /opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$SN __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service; fi
#Provision compute node
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
#Copy go-xcat script
cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./"
check:rc==0
#Install additional packages on Red Hat
cmd:if xdsh $$CN "grep \"Red Hat\" /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
#Replace sources.list file on Ubuntu
cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi
#Install devel version of xCAT
cmd:xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y install"
check:rc==0
cmd:xdsh $$CN "cat /tmp/go-xcat.log"
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "service xcatd stop"
end
start:go_xcat_stable_from_repo
description:test go-xcat GA on a newly provisioned node
label:go_xcat
os:Linux
#Make sure service node is not off, if it is, power it on
cmd:if rpower $$SN stat | grep "off"; then rpower $$SN on; sleep 300; fi
#Service not did not boot after 5 min, reprovision it
cmd:if lsdef $$SN -i status -c | grep -v "booted"; then /opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$SN __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service; fi
#Provision compute node
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
#Copy go-xcat script
cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./"
check:rc==0
#Install additional packages on Red Hat
cmd:if xdsh $$CN "grep \"Red Hat\" /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
#Replace sources.list file on Ubuntu
cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi
#Install GA version of xCAT
cmd:xdsh $$CN "cd /; ./go-xcat -y install"
check:rc==0
cmd:xdsh $$CN "cat /tmp/go-xcat.log"
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "service xcatd stop"
end
start:go_xcat_stable_from_repo_upgrade
description:test go-xcat GA on a newly provisioned node upgrade to devel
label:go_xcat
os:Linux
#Make sure service node is not off, if it is, power it on
cmd:if rpower $$SN stat | grep "off"; then rpower $$SN on; sleep 300; fi
#Service not did not boot after 5 min, reprovision it
cmd:if lsdef $$SN -i status -c | grep -v "booted"; then /opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$SN __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service; fi
#Provision compute node
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
#Copy go-xcat script
cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./"
check:rc==0
#Install additional packages on Red Hat
cmd:if xdsh $$CN "grep \"Red Hat\" /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
#Replace sources.list file on Ubuntu
cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi
#Install GA version of xCAT
cmd:xdsh $$CN "cd /; ./go-xcat -y install"
check:rc==0
cmd:xdsh $$CN "cat /tmp/go-xcat.log"
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
#Update to devel version of xCAT
cmd:xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y update"
check:rc==0
cmd:xdsh $$CN "cat /tmp/go-xcat.log"
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "service xcatd stop"
end
start:go_xcat_stable_from_repo_reinstall_devel
description:test go-xcat GA on a newly provisioned node, remove, install devel
label:go_xcat
os:Linux
#Make sure service node is not off, if it is, power it on
cmd:if rpower $$SN stat | grep "off"; then rpower $$SN on; sleep 300; fi
#Service not did not boot after 5 min, reprovision it
cmd:if lsdef $$SN -i status -c | grep -v "booted"; then /opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$SN __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service; fi
#Provision compute node
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$CN __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
check:output=~Provision node\(s\)\: $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
#Copy go-xcat script
cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./"
check:rc==0
#Install additional packages on Red Hat
cmd:if xdsh $$CN "grep \"Red Hat\" /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
#Replace sources.list file on Ubuntu
cmd:if grep Ubuntu /etc/*release;then code=`lsb_release -sc` && xdsh $$CN "scp -r $$MN:/opt/xcat/share/xcat/tools/autotest/testcase/go_xcat/$code-__GETNODEATTR($$CN,arch)__.sources.list /etc/apt/sources.list"; fi
#Install GA version of xCAT
cmd:xdsh $$CN "cd /; ./go-xcat -y install"
check:rc==0
cmd:xdsh $$CN "cat /tmp/go-xcat.log"
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
#Uninstall xCAT
cmd:xdsh $$CN "cd /; ./go-xcat -y completely uninstall"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc!=0
check:output=~could not be found|dead|no such service xcatd
#Install devel version of xCAT
cmd:xdsh $$CN "cd /; ./go-xcat --xcat-version=devel -y install"
check:rc==0
cmd:xdsh $$CN "cat /tmp/go-xcat.log"
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -a"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "service xcatd stop"
end