2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-22 05:55:35 +00:00

modify some test cases

This commit is contained in:
huweihua
2019-03-19 06:46:24 -04:00
parent 3f848bcb9c
commit 1cea7bcaa9
4 changed files with 14 additions and 16 deletions

View File

@ -11,10 +11,10 @@ cmd:chtab key=nameservers site.value="<xcatmaster>"
check:rc==0
cmd:makedns -n
check:rc==0
cmd:makeconservercf $$SN
cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$SN; else makeconservercf $$SN;fi
check:rc==0
cmd:cat /etc/conserver.cf | grep $$SN
check:output=~$$SN
#cmd:cat /etc/conserver.cf | grep $$SN
#check:output=~$$SN
cmd:sleep 20
cmd:if [[ "__GETNODEATTR($$SN,arch)__" = "ppc64" ]]; then getmacs -D $$SN -V; fi
check:rc==0
@ -45,7 +45,7 @@ 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";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";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/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .;
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";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/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .;
check:rc==0
cmd:mkdef -t osimage -o __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service --template __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-compute profile=service provmethod=netboot postscripts=servicenode
@ -54,7 +54,7 @@ check:rc==0
cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-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)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service otherpkglist=/opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist pkglist=/opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.pkglist exlist=/opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.exlist postinstall=/opt/xcat/share/xcat/netboot/$path/service.${ver%.*}.__GETNODEATTR($$SN,arch)__.postinstall
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";fi; ver="__GETNODEATTR($$SN,os)__"; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-netboot-service otherpkglist=/opt/xcat/share/xcat/netboot/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist pkglist=/opt/xcat/share/xcat/netboot/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.pkglist exlist=/opt/xcat/share/xcat/netboot/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.exlist postinstall=/opt/xcat/share/xcat/netboot/$path/service.${ver%%.*}.__GETNODEATTR($$SN,arch)__.postinstall
check:rc==0

View File

@ -12,10 +12,10 @@ check:rc==0
cmd:makedns -n
check:rc==0
cmd:makeconservercf $$SN
cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$SN; else makeconservercf $$SN;fi
check:rc==0
cmd:cat /etc/conserver.cf | grep $$SN
check:output=~$$SN
#cmd:cat /etc/conserver.cf | grep $$SN
#check:output=~$$SN
cmd:sleep 20
cmd:if [[ "__GETNODEATTR($$SN,arch)__" = "ppc64" ]]; then getmacs -D $$SN -V; fi
check:rc==0
@ -23,6 +23,7 @@ cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:sleep 2
cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$SN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$SN;fi
check:output=~$$SN
cmd:chdef -t node $$SN groups=service,all
@ -45,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";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";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/$path$ver/__GETNODEATTR($$SN,arch)__ && createrepo .;
cmd:if [[ "__GETNODEATTR($$SN,os)__" =~ "rh" ]]; then path="rh";elif [[ "__GETNODEATTR($$SN,os)__" =~ "sles" ]];then path="sles";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/$path$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)__" =~ "sles" ]];then path="sles";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)__" =~ "sles" ]];then path="sles";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
@ -59,8 +60,6 @@ check:rc==0
cmd:if rpm -qa|grep xCAT-openbmc-py 2>&1; then osimage="__GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service"; otherpkgdir=$(lsdef -t osimage $osimage -i otherpkgdir -c|awk -F"=" '{print $2}'); otherpkglist=$(lsdef -t osimage $osimage -i otherpkglist -c|awk -F"=" '{print $2}');mkdir -p $otherpkgdir/xcat/Packages; cp -r $$PYTHON_DEP_FED_DIR/Packages/*.rpm $otherpkgdir/xcat/Packages; cp -r $$PYTHON_DEP_EPEL_DIR/Packages/* $otherpkgdir/xcat/Packages; cp -r $$PYTHON_DEP_EXTRAS_DIR/Packages/* $otherpkgdir/xcat/Packages; cd $otherpkgdir/xcat/Packages && createrepo .; echo "xcat/Packages/python2-gevent" >> $otherpkglist; echo "xcat/Packages/python2-greenlet" >> $otherpkglist; echo "xcat/xcat-core/xCAT-openbmc-py" >> $otherpkglist; echo "--To check otherpkgdir"; ls -Rl $otherpkgdir/xcat/Packages; if ! ls -l $otherpkgdir/xcat/Packages|grep python2-gevent- > /dev/null 2>&1; then echo "there is nopython2-gevent package under $otherpkgdir/xcat/Packages";exit 1; fi; if ! ls -l $otherpkgdir/xcat/Packages|grep python2-greenlet- > /dev/null 2>&1; then echo "there is python2-greenlet under $otherpkgdir/xcat/Packages";exit 1; fi; echo "--To check otherpkglist"; cat $otherpkglist; if ! grep python2-gevent $otherpkglist > /dev/null 2>&1; then echo "there is no entry about python2-gevent in $otherpkglist"; exit 1;fi; if ! grep python2-greenlet $otherpkglist > /dev/null 2>&1; then echo "there is no entry about python2-greenlet in $otherpkglist"; exit 1;fi; exit 0; else echo "there is no xCAT-openbmc-py installed in MN, skip installing xCAT-openbmc-py in SN"; exit 0;fi
check:rc==0
#cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkgdir="/install/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__"
#check:rc==0
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/commoncmd/retry_install.sh $$SN __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service
check:rc==0

View File

@ -20,10 +20,10 @@ check:rc==0
cmd:makedns -n
check:rc==0
cmd:makeconservercf
cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$SN; else makeconservercf $$SN;fi
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CN
check:output=~$$CN
#cmd:cat /etc/conserver.cf | grep $$CN
#check:output=~$$CN
cmd:sleep 20
cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]]; then getmacs -D $$CN; fi
check:rc==0

View File

@ -194,7 +194,6 @@ end
start:makedhcp_remote_network
descriptiion:This case is to test when there is mgtifname='!remote!<nicname>', makedhcp could work correctly and create entrys in dhcp lease file.
os:linux
stop:yes
label:mn_only,dhcp
cmd:mkdef -t network -o testnetwork net=100.100.100.0 mask=255.255.255.0 mgtifname='!remote!eth0' gateway=100.100.100.1
check:rc==0