Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This example demonstrates executing commands on a remote machine |
| 3 | ... and getting their output and the return code. |
| 4 | ... |
| 5 | ... Notice how connections are handled as part of the suite setup and |
| 6 | ... teardown. This saves some time when executing several test cases. |
| 7 | |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 8 | Resource ../lib/rest_client.robot |
| 9 | Resource ../lib/ipmi_client.robot |
| 10 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | a743322 | 2017-03-23 23:47:11 -0500 | [diff] [blame] | 11 | Resource ../lib/state_manager.robot |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 12 | Library ../data/model.py |
Sweta Potthuri | af741cb | 2017-07-04 09:41:17 -0500 | [diff] [blame] | 13 | Resource ../lib/boot_utils.robot |
Steven Sombar | aaf72c4 | 2017-09-05 12:02:00 -0500 | [diff] [blame] | 14 | Resource ../lib/utils.robot |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 15 | |
Sweta Potthuri | 09a3cf9 | 2017-12-08 01:19:53 -0600 | [diff] [blame] | 16 | Suite Setup Suite Setup Execution |
Sweta Potthuri | 09a3cf9 | 2017-12-08 01:19:53 -0600 | [diff] [blame] | 17 | Test Teardown Test Teardown Execution |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 18 | |
| 19 | *** Variables *** |
Sweta Potthuri | af741cb | 2017-07-04 09:41:17 -0500 | [diff] [blame] | 20 | |
| 21 | ${stack_mode} skip |
| 22 | ${model}= ${OPENBMC_MODEL} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 23 | |
| 24 | *** Test Cases *** |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 25 | |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 26 | io_board Present |
Joy Onyerikwu | f4a807b | 2018-06-20 08:43:54 -0500 | [diff] [blame] | 27 | [Documentation] Verify that the IO board is present. |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 28 | [Tags] io_board_Present |
Sweta Potthuri | 4a55602 | 2017-11-24 04:03:37 -0600 | [diff] [blame] | 29 | ${uri}= Get System component io_board |
| 30 | Verify The Attribute ${uri} Present ${True} |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 31 | |
| 32 | io_board Fault |
Joy Onyerikwu | f4a807b | 2018-06-20 08:43:54 -0500 | [diff] [blame] | 33 | [Documentation] Verify that the IO board signals "fault". |
Rahul Maheshwari | f811910 | 2016-10-05 01:15:56 -0500 | [diff] [blame] | 34 | [Tags] io_board_Fault |
Sweta Potthuri | 4a55602 | 2017-11-24 04:03:37 -0600 | [diff] [blame] | 35 | ${uri}= Get System component io_board |
| 36 | Verify The Attribute ${uri} fault ${False} |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 37 | |
| 38 | *** Keywords *** |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 39 | |
Sweta Potthuri | 09a3cf9 | 2017-12-08 01:19:53 -0600 | [diff] [blame] | 40 | Suite Setup Execution |
Steven Sombar | aaf72c4 | 2017-09-05 12:02:00 -0500 | [diff] [blame] | 41 | [Documentation] Initial suite setup. |
George Keishing | f142668 | 2017-07-12 23:17:17 -0500 | [diff] [blame] | 42 | |
Sweta Potthuri | af741cb | 2017-07-04 09:41:17 -0500 | [diff] [blame] | 43 | # Boot Host. |
| 44 | REST Power On |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 45 | |
George Keishing | ab1bd92 | 2016-12-05 05:29:59 -0600 | [diff] [blame] | 46 | ${resp}= Read Properties ${OPENBMC_BASE_URI}enumerate timeout=30 |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 47 | Set Suite Variable ${SYSTEM_INFO} ${resp} |
| 48 | log Dictionary ${resp} |
| 49 | |
| 50 | Get System component |
Joy Onyerikwu | f4a807b | 2018-06-20 08:43:54 -0500 | [diff] [blame] | 51 | [Documentation] Get the system component. |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 52 | [Arguments] ${type} |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 53 | ${list}= Get Dictionary Keys ${SYSTEM_INFO} |
Michael Walsh | d917c6e | 2018-12-11 10:09:09 -0600 | [diff] [blame^] | 54 | ${resp}= Get Matches ${list} regexp=^.*[0-9a-z_].${type}\[0-9]*$ |
Gunnar Mills | 1cd544d | 2016-12-06 11:19:22 -0600 | [diff] [blame] | 55 | ${url}= Get From List ${resp} 0 |
Gunnar Mills | c9ea936 | 2016-12-13 16:21:13 -0600 | [diff] [blame] | 56 | [Return] ${url} |
Rahul Maheshwari | 4a4eb6e | 2016-09-24 01:06:36 -0500 | [diff] [blame] | 57 | |
Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 58 | |
Sweta Potthuri | 09a3cf9 | 2017-12-08 01:19:53 -0600 | [diff] [blame] | 59 | Test Teardown Execution |
Rahul Maheshwari | 06174f2 | 2017-03-06 03:17:09 -0600 | [diff] [blame] | 60 | [Documentation] Do the post test teardown. |
| 61 | ... 1. Capture FFDC on test failure. |
| 62 | ... 2. Close all open SSH connections. |
| 63 | |
| 64 | FFDC On Test Case Fail |
| 65 | Close All Connections |