blob: 1928aece22156d73e1c6ffcc337d4938c952ffb5 [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 Keishingc26e74d2017-11-17 00:45:20 -060011Resource ../lib/code_update_utils.robot
George Keishing9867bed2018-02-04 22:31:36 -060012Library ../lib/bmc_ssh_utils.py
George Keishing92abc992016-10-18 13:29:25 -050013
George Keishing94659a22017-11-17 00:03:05 -060014Test Teardown Test Teardown Execution
George Keishingc26e74d2017-11-17 00:45:20 -060015Suite Setup Suite Setup Execution
George Keishing92abc992016-10-18 13:29:25 -050016
17*** Variables ***
18${LOOP_COUNT} ${50}
19
20*** Test Cases ***
21
George Keishingca709b02017-02-02 11:38:19 -060022Run Multiple Power Cycle
23 [Documentation] Execute multiple power cycles.
24 [Setup] Validate Parameters
25 [Tags] Run_Multiple_Power_Cycle
George Keishing92abc992016-10-18 13:29:25 -050026
George Keishingca709b02017-02-02 11:38:19 -060027 # By default run test for 50 loops, else user input iteration.
28 # Fails immediately if any of the execution rounds fail and
29 # check if BMC is still pinging and FFDC is collected.
30 Repeat Keyword ${LOOP_COUNT} times Power Cycle System Via PDU
31
32
George Keishingbf1500d2017-10-30 12:47:47 -050033Run Multiple BMC Reset Via REST
34 [Documentation] Execute multiple reboots via REST.
35 [Tags] Run_Multiple_BMC_Reset_Via_REST
36
37 # By default run test for 50 loops, else user input iteration.
38 # Fails immediately if any of the execution rounds fail and
39 # check if BMC is still pinging and FFDC is collected.
40 Repeat Keyword ${LOOP_COUNT} times BMC REST Reset Cycle
41
42
43Run Multiple BMC Reset Via Reboot
44 [Documentation] Execute multiple reboots via "reboot" command.
45 [Tags] Run_Multiple_BMC_Reset_Via_Reboot
George Keishingca709b02017-02-02 11:38:19 -060046
47 # By default run test for 50 loops, else user input iteration.
48 # Fails immediately if any of the execution rounds fail and
49 # check if BMC is still pinging and FFDC is collected.
50 Repeat Keyword ${LOOP_COUNT} times BMC Reboot Cycle
George Keishing92abc992016-10-18 13:29:25 -050051
52
53*** Keywords ***
54
George Keishingca709b02017-02-02 11:38:19 -060055Power Cycle System Via PDU
56 [Documentation] Power cycle system and wait for BMC to reach Ready state.
57 Log "Doing power cycle"
George Keishing92abc992016-10-18 13:29:25 -050058 PDU Power Cycle
George Keishingca709b02017-02-02 11:38:19 -060059 Check If BMC Is Up 5 min 10 sec
George Keishing92abc992016-10-18 13:29:25 -050060
George Keishingca709b02017-02-02 11:38:19 -060061 Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
George Keishingb39a6792017-11-10 22:58:52 -060062 Verify BMC RTC And UTC Time Drift
George Keishingc26e74d2017-11-17 00:45:20 -060063 Field Mode Should Be Enabled
George Keishingca709b02017-02-02 11:38:19 -060064
65
George Keishingbf1500d2017-10-30 12:47:47 -050066BMC REST Reset Cycle
67 [Documentation] Reset BMC via REST and wait for ready state.
George Keishingca709b02017-02-02 11:38:19 -060068 Log "Doing Reboot cycle"
George Keishing137882c2017-10-28 09:19:05 -050069 ${bmc_version_before}= Get BMC Version
George Keishingca709b02017-02-02 11:38:19 -060070 Initiate BMC Reboot
71 Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
George Keishing137882c2017-10-28 09:19:05 -050072 ${bmc_version_after}= Get BMC Version
73 Should Be Equal ${bmc_version_before} ${bmc_version_after}
George Keishingb39a6792017-11-10 22:58:52 -060074 Verify BMC RTC And UTC Time Drift
George Keishingc26e74d2017-11-17 00:45:20 -060075 Field Mode Should Be Enabled
George Keishing92abc992016-10-18 13:29:25 -050076
77
George Keishingbf1500d2017-10-30 12:47:47 -050078BMC Reboot Cycle
79 [Documentation] Reboot BMC and wait for ready state.
80 Log "Doing Reboot cycle"
81 ${bmc_version_before}= Get BMC Version
82 OBMC Reboot (off) stack_mode=normal
83 ${bmc_version_after}= Get BMC Version
84 Should Be Equal ${bmc_version_before} ${bmc_version_after}
George Keishingb39a6792017-11-10 22:58:52 -060085 Verify BMC RTC And UTC Time Drift
George Keishingc26e74d2017-11-17 00:45:20 -060086 Field Mode Should Be Enabled
George Keishingbf1500d2017-10-30 12:47:47 -050087
88
George Keishing94659a22017-11-17 00:03:05 -060089Test Teardown Execution
90 [Documentation] Do test case tear-down.
George Keishing92abc992016-10-18 13:29:25 -050091 Ping Host ${OPENBMC_HOST}
Gunnar Millseac1af22016-11-14 15:30:09 -060092 FFDC On Test Case Fail
George Keishing92abc992016-10-18 13:29:25 -050093
George Keishing9867bed2018-02-04 22:31:36 -060094 # Example of the u-boot-env o/p:
95 # root@witherspoon:~# grep fieldmode /dev/mtd/u-boot-env
96 # fieldmode=true
97 # fieldmode=true
98 ${field_mode}=
99 ... BMC Execute Command grep fieldmode /dev/mtd/u-boot-env
100 Should Contain "${field_mode[0]}" fieldmode=true
101 ... msg=u-boot-env shows "fieldmode" is not set to true.
102
George Keishing92abc992016-10-18 13:29:25 -0500103
104Validate Parameters
George Keishing94659a22017-11-17 00:03:05 -0600105 [Documentation] Validate PDU parameters.
George Keishing92abc992016-10-18 13:29:25 -0500106 Should Not Be Empty ${PDU_IP}
107 Should Not Be Empty ${PDU_TYPE}
108 Should Not Be Empty ${PDU_SLOT_NO}
109 Should Not Be Empty ${PDU_USERNAME}
110 Should Not Be Empty ${PDU_PASSWORD}
111
George Keishingc26e74d2017-11-17 00:45:20 -0600112
113Suite Setup Execution
114 [Documentation] Enable field mode.
115 Enable Field Mode And Verify Unmount
116 Field Mode Should Be Enabled