blob: 89eb40725f89c88db537e9e5a2d2b9f9edabe28e [file] [log] [blame]
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -05001*** Settings ***
2
3Documentation Test reset reload functionality of BMC.
4
5Resource ../lib/rest_client.robot
6Resource ../lib/state_manager.robot
7Resource ../lib/openbmc_ffdc.robot
8
9Test Setup Open Connection And Log In
10Test Teardown Post Testcase Execution
11
12*** Variables ***
13
14
15*** Test Cases ***
16
Rahul Maheshwarib70a3162017-05-17 04:41:10 -050017Verify BMC Reset Reload With System On
18 [Documentation] Validate chassis "ON" and host "Running" state is
19 ... unchanged after BMC reset reload.
20 [Tags] Verify_BMC_Reset_Reload_With_System_On
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050021
22 Initiate Host Boot
23 Wait Until Keyword Succeeds 5 min 10 sec Is Chassis On
24 ${chassis_state_before}= Run Keyword Get Chassis Power State
25
26 Trigger Reset Reload via BMC Reboot
27
28 ${chassis_state_after}= Run Keyword Get Chassis Power State
29 ${rr_status}= Run Keyword Check Reset Reload Status
30
31 Should Be Equal ${chassis_state_before} ${chassis_state_after}
32 Should Be Equal ${rr_status} Yes
33
Rahul Maheshwarib70a3162017-05-17 04:41:10 -050034 ${host_state}= Run Keyword Get Host State
35 Should Be Equal ${host_state} Running
36
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050037
38*** Keywords ***
39
40Check Reset Reload Status
Gunnar Mills28e403b2017-10-25 16:16:38 -050041 [Documentation] Returns reset reload status based on file presence.
Rahul Maheshwari8dd7ed82017-03-22 17:11:41 -050042
43 ${rr_status}= Execute Command On BMC
44 ... test -e /run/openbmc/chassis@0-on && echo "Yes" || echo "No"
45 [Return] ${rr_status}
46
47
48Trigger Reset Reload via BMC Reboot
49 [Documentation] Initiate Reset reload using BMC Reboot.
50
51 Initiate BMC Reboot
52 Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
53
54
55Post Testcase Execution
56 [Documentation] Do the post test teardown.
57 ... 1. Capture FFDC on test failure.
58 ... 2. Close all open SSH connections.
59
60 FFDC On Test Case Fail
61 Close All Connections