Rahul Maheshwari | 982fee4 | 2017-05-03 00:33:15 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite tests IPMI SOL in OpenBMC. |
| 3 | |
| 4 | Resource ../../lib/ipmi_client.robot |
| 5 | Resource ../../lib/openbmc_ffdc.robot |
| 6 | |
| 7 | Test Teardown Post Test Case Execution |
| 8 | |
| 9 | *** Variables *** |
| 10 | |
| 11 | *** Test Cases *** |
| 12 | |
| 13 | Verify SOL During Boot |
| 14 | [Documentation] Verify SOL during boot. |
| 15 | [Tags] Verify_SOL_During_Boot |
| 16 | |
| 17 | ${current_state}= Get Host State Via External IPMI |
Rahul Maheshwari | cd441b8 | 2017-06-01 13:42:35 -0500 | [diff] [blame] | 18 | Run Keyword If '${current_state}' == 'on' |
Rahul Maheshwari | 982fee4 | 2017-05-03 00:33:15 -0500 | [diff] [blame] | 19 | ... Initiate Host PowerOff Via External IPMI |
| 20 | Initiate Host Boot Via External IPMI wait=${0} |
| 21 | |
| 22 | Activate SOL Via IPMI |
| 23 | Wait Until Keyword Succeeds 10 mins 30 secs |
| 24 | ... Check IPMI SOL Output Content Petitboot |
| 25 | |
| 26 | Verify Deactivate Non Existing SOL |
| 27 | [Documentation] Verify deactivate non existing SOL session. |
| 28 | [Tags] Verify_Deactivate_Non_Existing_SOL |
| 29 | |
| 30 | ${resp}= Deactivate SOL Via IPMI |
| 31 | Should Contain ${resp} SOL payload already de-activated |
| 32 | ... case_insensitive=True |
| 33 | |
| 34 | |
| 35 | *** Keywords *** |
| 36 | |
| 37 | Post Test Case Execution |
| 38 | [Documentation] Do the post test teardown. |
| 39 | |
| 40 | Deactivate SOL Via IPMI |
| 41 | FFDC On Test Case Fail |
| 42 | |
| 43 | Check IPMI SOL Output Content |
| 44 | [Documentation] Check if SOL has given content. |
| 45 | [Arguments] ${data} ${file_path}=/tmp/sol_${OPENBMC_HOST} |
| 46 | # Description of argument(s): |
| 47 | # data Content which need to be checked(e.g. Petitboot, ISTEP). |
| 48 | # file_path The file path on the local machine to check SOL content. |
| 49 | # By default it check SOL content from /tmp/sol_<BMC_IP>. |
| 50 | |
| 51 | ${rc} ${output}= Run and Return RC and Output cat ${file_path} |
| 52 | Should Be Equal ${rc} ${0} msg=${output} |
| 53 | |
| 54 | Should Contain ${output} ${data} case_insensitive=True |