blob: 9c85227e9c568d2f48fea1fe735d31e360d6731b [file] [log] [blame]
George Keishing92abc992016-10-18 13:29:25 -05001*** Settings ***
2Documentation Power cycle loop. This is to test where network service
3... becomes unavailable during AC-Cycle stress test.
4
5Resource ../lib/rest_client.robot
6Resource ../lib/pdu/pdu.robot
7Resource ../lib/utils.robot
8Resource ../lib/openbmc_ffdc.robot
George Keishingca709b02017-02-02 11:38:19 -06009Resource ../lib/state_manager.robot
George Keishingbf1500d2017-10-30 12:47:47 -050010Resource ../lib/boot_utils.robot
George Keishing92abc992016-10-18 13:29:25 -050011
George Keishing94659a22017-11-17 00:03:05 -060012Test Teardown Test Teardown Execution
George Keishing92abc992016-10-18 13:29:25 -050013
14*** Variables ***
15${LOOP_COUNT} ${50}
16
17*** Test Cases ***
18
George Keishingca709b02017-02-02 11:38:19 -060019Run Multiple Power Cycle
20 [Documentation] Execute multiple power cycles.
21 [Setup] Validate Parameters
22 [Tags] Run_Multiple_Power_Cycle
George Keishing92abc992016-10-18 13:29:25 -050023
George Keishingca709b02017-02-02 11:38:19 -060024 # By default run test for 50 loops, else user input iteration.
25 # Fails immediately if any of the execution rounds fail and
26 # check if BMC is still pinging and FFDC is collected.
27 Repeat Keyword ${LOOP_COUNT} times Power Cycle System Via PDU
28
29
George Keishingbf1500d2017-10-30 12:47:47 -050030Run Multiple BMC Reset Via REST
31 [Documentation] Execute multiple reboots via REST.
32 [Tags] Run_Multiple_BMC_Reset_Via_REST
33
34 # By default run test for 50 loops, else user input iteration.
35 # Fails immediately if any of the execution rounds fail and
36 # check if BMC is still pinging and FFDC is collected.
37 Repeat Keyword ${LOOP_COUNT} times BMC REST Reset Cycle
38
39
40Run Multiple BMC Reset Via Reboot
41 [Documentation] Execute multiple reboots via "reboot" command.
42 [Tags] Run_Multiple_BMC_Reset_Via_Reboot
George Keishingca709b02017-02-02 11:38:19 -060043
44 # By default run test for 50 loops, else user input iteration.
45 # Fails immediately if any of the execution rounds fail and
46 # check if BMC is still pinging and FFDC is collected.
47 Repeat Keyword ${LOOP_COUNT} times BMC Reboot Cycle
George Keishing92abc992016-10-18 13:29:25 -050048
49
50*** Keywords ***
51
George Keishingca709b02017-02-02 11:38:19 -060052Power Cycle System Via PDU
53 [Documentation] Power cycle system and wait for BMC to reach Ready state.
54 Log "Doing power cycle"
George Keishing92abc992016-10-18 13:29:25 -050055 PDU Power Cycle
George Keishingca709b02017-02-02 11:38:19 -060056 Check If BMC Is Up 5 min 10 sec
George Keishing92abc992016-10-18 13:29:25 -050057
George Keishingca709b02017-02-02 11:38:19 -060058 Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
George Keishingb39a6792017-11-10 22:58:52 -060059 Verify BMC RTC And UTC Time Drift
George Keishingca709b02017-02-02 11:38:19 -060060
61
George Keishingbf1500d2017-10-30 12:47:47 -050062BMC REST Reset Cycle
63 [Documentation] Reset BMC via REST and wait for ready state.
George Keishingca709b02017-02-02 11:38:19 -060064 Log "Doing Reboot cycle"
George Keishing137882c2017-10-28 09:19:05 -050065 ${bmc_version_before}= Get BMC Version
George Keishingca709b02017-02-02 11:38:19 -060066 Initiate BMC Reboot
67 Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
George Keishing137882c2017-10-28 09:19:05 -050068 ${bmc_version_after}= Get BMC Version
69 Should Be Equal ${bmc_version_before} ${bmc_version_after}
George Keishingb39a6792017-11-10 22:58:52 -060070 Verify BMC RTC And UTC Time Drift
George Keishing92abc992016-10-18 13:29:25 -050071
72
George Keishingbf1500d2017-10-30 12:47:47 -050073BMC Reboot Cycle
74 [Documentation] Reboot BMC and wait for ready state.
75 Log "Doing Reboot cycle"
76 ${bmc_version_before}= Get BMC Version
77 OBMC Reboot (off) stack_mode=normal
78 ${bmc_version_after}= Get BMC Version
79 Should Be Equal ${bmc_version_before} ${bmc_version_after}
George Keishingb39a6792017-11-10 22:58:52 -060080 Verify BMC RTC And UTC Time Drift
George Keishingbf1500d2017-10-30 12:47:47 -050081
82
George Keishing94659a22017-11-17 00:03:05 -060083Test Teardown Execution
84 [Documentation] Do test case tear-down.
George Keishing92abc992016-10-18 13:29:25 -050085 Ping Host ${OPENBMC_HOST}
Gunnar Millseac1af22016-11-14 15:30:09 -060086 FFDC On Test Case Fail
George Keishing92abc992016-10-18 13:29:25 -050087
88
89Validate Parameters
George Keishing94659a22017-11-17 00:03:05 -060090 [Documentation] Validate PDU parameters.
George Keishing92abc992016-10-18 13:29:25 -050091 Should Not Be Empty ${PDU_IP}
92 Should Not Be Empty ${PDU_TYPE}
93 Should Not Be Empty ${PDU_SLOT_NO}
94 Should Not Be Empty ${PDU_USERNAME}
95 Should Not Be Empty ${PDU_PASSWORD}
96