From cf663c465fe91e9bd44f6b60dad72525f1dffdf8 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 25 Feb 2020 15:05:39 -0500 Subject: [PATCH 1/3] Initial testcase for go-xcat devel from repo --- xCAT-test/autotest/testcase/go_xcat/case3 | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 xCAT-test/autotest/testcase/go_xcat/case3 diff --git a/xCAT-test/autotest/testcase/go_xcat/case3 b/xCAT-test/autotest/testcase/go_xcat/case3 new file mode 100644 index 000000000..2f4fbdc67 --- /dev/null +++ b/xCAT-test/autotest/testcase/go_xcat/case3 @@ -0,0 +1,30 @@ +start:go_xcat_devel_from_repo +description:test go-xcat devel on a newly provisioned node +label:go_xcat +os:Linux +cmd:rpower $$SN on +cmd:sleep 300 +#Provision compute node +cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute +check:rc==0 +check:output=~Provision node\(s\)\: $$CN +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 3 ];then break;fi done +cmd:lsdef -l $$CN | grep status + +#Copy go-xcat script +cmd:xdsh $$CN "cd /; scp -r $$MN:/opt/xcat/share/xcat/tools/go-xcat ./" +check:rc==0 + +#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 "cat /etc/yum.repos.d/xcat-core.repo" +cmd:xdsh $$CN "cat /etc/yum.repos.d/xcat-dep.repo" +cmd:xdsh $$CN "cat /etc/yum.repos.d/local-repository-0.repo" +cmd:xdsh $$CN "service xcatd status" +check:rc==0 +check:output=~running +cmd:xdsh $$CN "service xcatd stop" From 72f6cc88705bbf48378d9ef8bd1247846dde4af8 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 25 Feb 2020 16:32:06 -0500 Subject: [PATCH 2/3] Make sure service node is booted --- xCAT-test/autotest/testcase/go_xcat/case3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-test/autotest/testcase/go_xcat/case3 b/xCAT-test/autotest/testcase/go_xcat/case3 index 2f4fbdc67..2fadbc93d 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case3 +++ b/xCAT-test/autotest/testcase/go_xcat/case3 @@ -2,8 +2,12 @@ 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 booted cmd:rpower $$SN on cmd:sleep 300 +cmd:lsdef $$SN -i status +check:output=~booted + #Provision compute node cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 From ae967cb7ee850105fe7e6e39874f764287a7920b Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 25 Feb 2020 16:35:15 -0500 Subject: [PATCH 3/3] More changes for comments --- xCAT-test/autotest/testcase/go_xcat/case3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-test/autotest/testcase/go_xcat/case3 b/xCAT-test/autotest/testcase/go_xcat/case3 index 2fadbc93d..2f43a619b 100644 --- a/xCAT-test/autotest/testcase/go_xcat/case3 +++ b/xCAT-test/autotest/testcase/go_xcat/case3 @@ -12,7 +12,7 @@ check:output=~booted cmd:rinstall $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute check:rc==0 check:output=~Provision node\(s\)\: $$CN -cmd:a=0;while ! `lsdef -l $$CN|grep status|grep installing >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 3 ];then break;fi done +cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 20; echo "[$a] " $(lsdef $$CN -i status -c); ((a++));if [ $a -gt 30 ];then break;fi done cmd:lsdef -l $$CN | grep status #Copy go-xcat script