diff --git a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 index 3ae3b2807..529ba0933 100644 --- a/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 +++ b/xCAT-test/autotest/testcase/UT_openbmc/rinv_cases0 @@ -1,35 +1,29 @@ -start:rinv_check_active_fw -description: Ensure that there is only 1 active BMC and 1 Active PNOR -os:Linux +start:rinv_check_active_fw_count +description: Ensure that there is only 2 active firmware, one for bmc and one for pnor hcp:openbmc -cmd:rinv $$CN firm | grep -i ibm +cmd: rinv $$CN firm | tee /tmp/xcattest.rinv_check_active_fw_count.output +check:rc==0 +cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'HOST Firmware Product' | grep -i 'Active)*' | wc -l +check:rc==0 +check:output=~1 +cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count.output | grep -i 'BMC Firmware Product'|grep -i 'Active)*' | wc -l +check:rc==0 +check:output=~1 +cmd : rm -rf /tmp/xcattest.rinv_check_active_fw_count.output check:rc==0 -check:output=~$$CN: BMC Firmware Product -check:output=~$$CN: HOST Firmware Product end -start:rinv_check_active_fw_count -description: Ensure that there are only 2 active firmware (if previous test is OK) -os:Linux +start:rinv_check_active_fw_count_verbose +description: Ensure that there is only 2 active firmware, one for bmc and one for pnor (in verbose mode) (Issue #4236) hcp:openbmc -# show the output -cmd:rinv $$CN firm | grep -i ibm +cmd: rinv $$CN firm -V | tee /tmp/xcattest.rinv_check_active_fw_count_verbose.output check:rc==0 -# check based on wc -cmd:rinv $$CN firm | grep -i ibm | wc -l +cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count_verbose.output| grep -i 'HOST Firmware Product' | grep -i 'Active)*' | wc -l +check:rc==0 +check:output=~1 +cmd: grep -i ibm /tmp/xcattest.rinv_check_active_fw_count_verbose.output | grep -i 'BMC Firmware Product'|grep -i 'Active)*' | wc -l +check:rc==0 +check:output=~1 +cmd : rm -rf /tmp/xcattest.rinv_check_active_fw_count_verbose.output check:rc==0 -check:output=~2 -end - -start:rinv_check_active_fw_verbose_count -description: Ensure that there is only 2 active firmware (in verbose mode) (Issue #4236) -os:Linux -hcp:openbmc -# show the output -cmd:rinv $$CN firm -V | grep -i Active -check:rc==0 -# validate test cased on word count -cmd:rinv $$CN firm -V | grep -i Active | wc -l -check:rc==0 -check:output=~2 end