mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 11:42:05 +00:00
Update some openbmc test cases
This commit is contained in:
parent
01ad6cd6a6
commit
e13a71c03f
@ -85,6 +85,6 @@ os:Linux
|
||||
hcp:openbmc
|
||||
label:cn_bmc_ready,hctrl_openbmc
|
||||
cmd: rflash $$CN -l | grep \* | grep BMC | awk '{print $2}' | xargs -i{} rflash $$CN --delete {}
|
||||
check:rc==1
|
||||
check:rc!=0
|
||||
check:output=~$$CN: (\[.*?\]: )?Error: Deleting currently active BMC firmware is not supported
|
||||
end
|
||||
|
@ -62,9 +62,9 @@ check:rc==0
|
||||
check:output=~$$CN: Total Power:
|
||||
cmd: rvitals $$CN leds
|
||||
check:rc==0
|
||||
check:output=~$$CN: Front
|
||||
check:output=~$$CN: Front Fans
|
||||
check:output=~$$CN: Rear
|
||||
check:output=~$$CN: LEDs Front
|
||||
check:output=~$$CN: LEDs Fan
|
||||
check:output=~$$CN: LEDs Rear
|
||||
cmd: rvitals $$CN all
|
||||
check:rc==0
|
||||
check:output=~$$CN: Ambient:
|
||||
|
@ -197,35 +197,3 @@ check:output=~Error: (\[.*?\]: )?[Uu]nsupported command[:]* rpower ddd
|
||||
check:rc==1
|
||||
end
|
||||
|
||||
start:rpower_bmcreboot_perl_python_output
|
||||
description:record the output for rpower bmcreboot and compare the output for perl and python version.
|
||||
hcp:openbmc
|
||||
label:cn_bmc_ready,hctrl_openbmc
|
||||
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/UT_openbmc/scripts/bmcreboot.sh $$CN /tmp/xcattest.rpower.bmcstate.perl.out PERL
|
||||
check:rc==0
|
||||
cmd: grep "Login to BMC failed: 500" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l
|
||||
check:output=~3
|
||||
cmd: grep "timeout" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l
|
||||
check:output=~1
|
||||
cmd: grep "No route to host" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l
|
||||
check:output=~1
|
||||
cmd: grep "BMC NotReady" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l
|
||||
check:output=~1
|
||||
cmd: grep "BMC Ready" /tmp/xcattest.rpower.bmcstate.perl.out | sort | uniq | wc -l
|
||||
check:output=~1
|
||||
cmd: cat /tmp/xcattest.rpower.bmcstate.perl.out
|
||||
cmd: /opt/xcat/share/xcat/tools/autotest/testcase/UT_openbmc/scripts/bmcreboot.sh $$CN /tmp/xcattest.rpower.bmcstate.python.out PYTHON
|
||||
check:rc==0
|
||||
cmd: grep "Login to BMC failed: 500" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l
|
||||
check:output=~3
|
||||
cmd: grep "timeout" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l
|
||||
check:output=~1
|
||||
cmd: grep "No route to host" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l
|
||||
check:output=~1
|
||||
cmd: grep "BMC NotReady" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l
|
||||
check:output=~1
|
||||
cmd: grep "BMC Ready" /tmp/xcattest.rpower.bmcstate.python.out | sort | uniq | wc -l
|
||||
check:output=~1
|
||||
cmd: cat /tmp/xcattest.rpower.bmcstate.python.out
|
||||
cmd:rm -rf /tmp/xcattest.rpower.bmcstate.perl.out /tmp/xcattest.rpower.bmcstate.python.out
|
||||
end
|
||||
|
@ -45,7 +45,7 @@ end
|
||||
|
||||
start:rspconfig_sshcfg
|
||||
hcp:hmc
|
||||
label:cn_bmc_ready,hctrl_hmc,hctrl_openbmc
|
||||
label:cn_bmc_ready,hctrl_hmc
|
||||
cmd:rspconfig __GETNODEATTR($$CN,hcp)__ sshcfg
|
||||
check:rc==0
|
||||
check:output=~__GETNODEATTR($$CN,hcp)__: \w+
|
||||
@ -302,27 +302,41 @@ cmd:mkdir -p /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname
|
||||
check:rc == 0
|
||||
cmd:lsdef $$CN -z > /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/$$CN.stanza
|
||||
check:rc == 0
|
||||
cmd:chdef -t node -o bogus_bmc_hostname groups=bmc ip=__GETNODEATTR($$CN,bmc)__
|
||||
cmd:rspconfig $$CN sshcfg
|
||||
check:rc == 0
|
||||
cmd:lsdef bogus_bmc_hostname
|
||||
cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname" | tee /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_old_name
|
||||
cmd:chdef -t node -o bogus-bmc-hostname groups=bmc ip=__GETNODEATTR($$CN,bmc)__
|
||||
check:rc == 0
|
||||
cmd:makehosts bogus_bmc_hostname
|
||||
cmd:lsdef bogus-bmc-hostname
|
||||
check:rc == 0
|
||||
cmd:chdef $$CN bmc=bogus_bmc_hostname
|
||||
cmd:makehosts bogus-bmc-hostname
|
||||
check:rc == 0
|
||||
cmd:makedns bogus-bmc-hostname
|
||||
check:rc == 0
|
||||
cmd:chdef $$CN bmc=bogus-bmc-hostname
|
||||
check:rc == 0
|
||||
cmd:lsdef $$CN -i bmc -c
|
||||
check:rc == 0
|
||||
cmd:rspconfig $$CN hostname=*
|
||||
check:rc == 0
|
||||
check:output =~$$CN: BMC Hostname: bogus_bmc_hostname
|
||||
cmd:makehosts -d bogus_bmc_hostname
|
||||
check:output =~$$CN: BMC Hostname: bogus-bmc-hostname
|
||||
cmd:ssh __GETNODEATTR(bogus-bmc-hostname,ip)__ "hostname" | tee /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_new_name
|
||||
check:rc == 0
|
||||
cmd:rmdef bogus_bmc_hostname
|
||||
cmd:echo "bogus-bmc-hostname" > /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_set_name
|
||||
cmd:diff -y /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_set_name /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_new_name
|
||||
check:rc == 0
|
||||
cmd:makedns -d bogus-bmc-hostname
|
||||
check:rc == 0
|
||||
cmd:makehosts -d bogus-bmc-hostname
|
||||
check:rc == 0
|
||||
cmd:rmdef bogus-bmc-hostname
|
||||
check:rc == 0
|
||||
cmd:rmdef $$CN
|
||||
check:rc == 0
|
||||
cmd:cat /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/$$CN.stanza |mkdef -z
|
||||
check:rc == 0
|
||||
cmd:ip=$(cat /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname/bmc_old_name);ssh __GETNODEATTR($$CN,bmc)__ "hostname=bogus-bmc-hostname"
|
||||
cmd:ssh __GETNODEATTR($$CN,bmc)__ "hostname"
|
||||
cmd:rm -rf /tmp/rspconfig_set_hostname_equal_star_with_bmc_is_hostname
|
||||
check:rc == 0
|
||||
end
|
||||
|
@ -145,7 +145,7 @@ check:output =~$$CN:\s*Dump requested
|
||||
check:output =~$$CN:\s*Downloading dump
|
||||
cmd:rspconfig $$CN dump -l |tail -n 1 |tee /tmp/dumpgenerate
|
||||
check:rc == 0
|
||||
cmd:dumpnumber=`sed -r 's/.+\[(.+)\].+/\1/g' /tmp/dumpgenerate`;dumpsize=`grep "\[$dumpnumber\] Generated" /tmp/dumpgenerate |cut -d : -f 6`;ls -l /var/log/xcat/dump/*_$$CN_dump_$dumpnumber.tar.xz|grep $dumpsize
|
||||
cmd:dumpnumber=`sed -r 's/.+\[(.+)\].+/\1/g' /tmp/dumpgenerate`;dumpsize=`grep "\[$dumpnumber\] Generated" /tmp/dumpgenerate |cut -d : -f 6`;ls -l /var/log/xcat/dump/*_dump_$dumpnumber.tar.xz|grep $dumpsize|grep $$CN
|
||||
check:rc == 0
|
||||
cmd:rm -rf /tmp/dumpgenerate
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user