Development test HW CI
Changes:
- Added robot user variable parameter to skip OCC and
Power check, by default enabled.
- New HW_CI_DEV list.
Usage:
robot -v OPENBMC_HOST:xx.xx.xx.xx
-v additional_power_check:0 -v check_performance:0
-v BOOT_TABLE_PATH:data/boot_table_redfish.json
--argumentfile test_list/HW_CI_DEV redfish/ ipmi/ tests/
Change-Id: I1288a8f9cfb057c00342cfa414b5ec9ca861e7b7
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/redfish/systems/test_power_operations.robot b/redfish/systems/test_power_operations.robot
index 4797e27..563f24e 100644
--- a/redfish/systems/test_power_operations.robot
+++ b/redfish/systems/test_power_operations.robot
@@ -8,6 +8,11 @@
Test Setup Test Setup Execution
Test Teardown Test Teardown Execution
+*** Variables ***
+
+# Extended code to check OCC state, power metric and others.
+${additional_power_check} ${1}
+
*** Test Cases ***
Verify Redfish Host GracefulShutdown
@@ -33,36 +38,7 @@
Redfish Power On
- # TODO: Replace OCC state check with redfish property when available.
- Verify OCC State
-
- ${power_uri_list}= redfish_utils.Get Members URI /redfish/v1/Chassis/ PowerControl
- Log List ${power_uri_list}
-
- # Power entries could be seen across different redfish path, remove the URI
- # where the attribute is non-existent.
- # Example:
- # ['/redfish/v1/Chassis/chassis/Power',
- # '/redfish/v1/Chassis/motherboard/Power']
- FOR ${idx} IN @{power_uri_list}
- ${power_control}= redfish_utils.Get Attribute ${idx} PowerControl
- Log Dictionary ${power_control[0]}
-
- # Ensure the path does have the attribute else set to EMPTY as default to skip.
- ${value}= Get Variable Value ${power_control[0]['PowerConsumedWatts']} ${EMPTY}
- Run Keyword If "${value}" == "${EMPTY}"
- ... Remove Values From List ${power_uri_list} ${idx}
-
- # Check the next available element in the list.
- Continue For Loop If "${value}" == "${EMPTY}"
-
- Valid Dict power_control[${0}] ['PowerConsumedWatts']
-
- END
-
- # Double check, the validation has at least one valid path.
- Should Not Be Empty ${power_uri_list}
- ... msg=Should contain at least one element in the list.
+ Run Keyword If ${additional_power_check} == ${1} Additional OCC And Power Check
Verify Redfish BMC GracefulRestart
@@ -100,3 +76,38 @@
... ELSE
... Set Auto Reboot ${1}
Redfish.Logout
+
+
+Additional OCC And Power Check
+ [Documentation] Verify OCC state and PowerConsumedWatts property.
+
+ # TODO: Replace OCC state check with redfish property when available.
+ Verify OCC State
+
+ ${power_uri_list}= redfish_utils.Get Members URI /redfish/v1/Chassis/ PowerControl
+ Log List ${power_uri_list}
+
+ # Power entries could be seen across different redfish path, remove the URI
+ # where the attribute is non-existent.
+ # Example:
+ # ['/redfish/v1/Chassis/chassis/Power',
+ # '/redfish/v1/Chassis/motherboard/Power']
+ FOR ${idx} IN @{power_uri_list}
+ ${power_control}= redfish_utils.Get Attribute ${idx} PowerControl
+ Log Dictionary ${power_control[0]}
+
+ # Ensure the path does have the attribute else set to EMPTY as default to skip.
+ ${value}= Get Variable Value ${power_control[0]['PowerConsumedWatts']} ${EMPTY}
+ Run Keyword If "${value}" == "${EMPTY}"
+ ... Remove Values From List ${power_uri_list} ${idx}
+
+ # Check the next available element in the list.
+ Continue For Loop If "${value}" == "${EMPTY}"
+
+ Valid Dict power_control[${0}] ['PowerConsumedWatts']
+
+ END
+
+ # Double check, the validation has at least one valid path.
+ Should Not Be Empty ${power_uri_list}
+ ... msg=Should contain at least one element in the list.
diff --git a/test_lists/HW_CI_DEV b/test_lists/HW_CI_DEV
new file mode 100644
index 0000000..254c228
--- /dev/null
+++ b/test_lists/HW_CI_DEV
@@ -0,0 +1,29 @@
+#Verify SSH and IPMI interfaces
+-i Test_SSH_And_IPMI_Connections
+#Basic poweron test
+-i Verify_Redfish_Host_PowerOn
+-i Verify_Redfish_Host_PowerOff
+#Check for apps failures.
+-i Check_For_Application_Failures
+#Verify system boot time average
+-i Verify_Uptime_Average_Against_Threshold
+#Check for BMC dump.
+-i Verify_No_BMC_Dump_And_Application_Failures
+#Redfish tests cases.
+-i Redfish_Login_And_Logout
+-i GET_Redfish_Hypermedia_Without_Login
+-i GET_Redfish_Resources_With_Login
+-i GET_Redfish_SessionService_Without_Login
+-i Redfish_Login_Using_Invalid_Token
+-i Delete_Redfish_Session_Using_Valid_Login
+-i Redfish_Login_With_Invalid_Credentials
+-i Redfish_Login_Using_Unsecured_HTTP
+-i Verify_Update_Service_Enabled
+-i Verify_Redfish_Software_Inventory_Collection
+-i Redfish_Software_Inventory_Status_Check
+-i Verify_Redfish_BMC_Manager_Properties
+#IPMI tests.
+-i Enable_IPMI_User_And_Verify
+-i Verify_IPMI_User_Deletion
+#Local user tests.
+-i Verify_AccountService_Available