Enable IPMI protocol by original status
Get IPMI protocol enabled in suite setup, and restore it in suite
teardwon.
Signed-off-by: Brian Ma <chma0@nuvoton.com>
Change-Id: Ia6708d76d3ecff1c06733cd8ea959f83d5a66916
diff --git a/redfish/managers/test_bmc_protocol_settings.robot b/redfish/managers/test_bmc_protocol_settings.robot
index a59ecc3..ca7356c 100644
--- a/redfish/managers/test_bmc_protocol_settings.robot
+++ b/redfish/managers/test_bmc_protocol_settings.robot
@@ -5,8 +5,8 @@
Resource ../../lib/openbmc_ffdc.robot
Resource ../../lib/protocol_setting_utils.robot
-Suite Setup Redfish.Login
-Suite Teardown Redfish.Logout
+Suite Setup Suite Setup Execution
+Suite Teardown Run Keywords Enable IPMI Protocol ${initial_ipmi_state} AND Redfish.Logout
Test Teardown FFDC On Test Case Fail
@@ -131,7 +131,6 @@
Enable IPMI Protocol And Verify
[Documentation] Enable IPMI protocol and verify.
[Tags] Enable_IPMI_Protocol_And_Verify
- [Teardown] Enable IPMI Protocol ${False}
Enable IPMI Protocol ${True}
@@ -162,6 +161,15 @@
*** Keywords ***
+Suite Setup Execution
+ [Documentation] Do suite setup tasks.
+
+ Redfish.Login
+
+ ${state}= Run Keyword And Return Status Verify IPMI Protocol State
+ Set Suite Variable ${initial_ipmi_state} ${state}
+
+
Is BMC LastResetTime Changed
[Documentation] return fail if BMC last reset time is not changed
[Arguments] ${reset_time}