diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 index 80717745b..2faa0d1e4 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 @@ -1,3 +1,10 @@ +start:rinv_record_firmware_level +description: Record the firmware level for the start of each testcase +hcp:openbmc +cmd: rinv $$CN firm +check:rc==0 +end + start:rinv_check_active_fw_count description: Ensure that there is only 2 active firmware, one for bmc and one for pnor hcp:openbmc diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 new file mode 100644 index 000000000..a1d4c4925 --- /dev/null +++ b/xCAT-test/autotest/testcase/UT_openbmc/rspconfig_cases0 @@ -0,0 +1,71 @@ +start:rspconfig_record_firmware_level +description: Record the firmware level for the start of each testcase +hcp:openbmc +cmd: rinv $$CN firm +check:rc==0 +end + +start:rspconfig_get_all +description: Check that we can get all the attributes from the BMC +os:Linux +hcp:openbmc +cmd:rspconfig $$CN ip netmask gateway hostname vlan +check:rc==0 +check:output=~$$CN: BMC IP: +check:output=~$$CN: BMC Netmask: +check:output=~$$CN: BMC Gateway: +check:output=~$$CN: BMC Hostname: +check:output=~$$CN: BMC VLAN ID: +end + +start:rspconfig_get_all_error +description: Check the parsing code for rspconfig (error cases) +hcp: openbmc +cmd: rspconfig $$CN ip,netmask,gateway,hostname,vlan +check:rc==1 +check:output=~Error: Unsupported command +end + +start:rspconfig_get_set_error +description: Check the parsing code for rspconfig (error cases) - Cannot get/set in same line +hcp: openbmc +cmd: rspconfig $$CN ip netmask=255.0.0.0 +check:rc==1 +check:output=~Error: Can not set and query OpenBMC information at the same time +end + +start:rspconfig_get_and_set_hostname +description: Test setting and getting hostname on the BMC +os:Linux +hcp:openbmc +# Save the hostname to a file.... +cmd:rspconfig $$CN hostname | tee /tmp/xcattest.rspconfig.hostname +check:rc==0 +check:output=~$$CN: BMC Hostname: +# Set to witherspoon first +cmd:rspconfig $$CN hostname=witherspoon +check:rc==0 +check:output=~$$CN: BMC Setting Hostname... +# Check that it's set to witherspoon +cmd:rspconfig $$CN hostname +check:rc==0 +check:output=~$$CN: BMC Hostname: witherspoon +# Set to -UTset +cmd:rspconfig $$CN hostname=$$CN-UTset +check:rc==0 +check:output=~$$CN: BMC Setting Hostname... +# Check that it's set +cmd:rspconfig $$CN hostname +check:rc==0 +check:output=~$$CN: BMC Hostname: $$CN-UTset +# Restore to saved version +cmd:grep BMC /tmp/xcattest.rspconfig.hostname | cut -d' ' -f4 | xargs -i{} rspconfig $$CN hostname={} +check:rc==0 +check:output=~$$CN: BMC Setting Hostname... +cmd:rspconfig $$CN hostname +check:rc==0 +check:output=~$$CN: BMC Hostname: +cmd:rm /tmp/xcattest.rspconfig.hostname +check:rc==0 +end + diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 2ddc8f679..6ff168d60 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -300,7 +300,7 @@ if ($restore) { } } -log_this($running_log_fd, "xCAT automated test finished at" . scalar(localtime())); +log_this($running_log_fd, "xCAT automated test finished at " . scalar(localtime())); log_this($running_log_fd, "Please check results in the $resultdir, \nand see $failed_log_name file for failed cases."); #To generate performance report