George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Suite to test harware sensors. |
| 3 | |
| 4 | Resource ../lib/utils.robot |
| 5 | Resource ../lib/boot_utils.robot |
| 6 | Resource ../lib/state_manager.robot |
| 7 | Resource ../lib/openbmc_ffdc.robot |
| 8 | |
| 9 | Suite Setup Pre Test Suite Execution |
| 10 | Test Teardown Post Test Case Execution |
| 11 | |
| 12 | *** Test Cases *** |
| 13 | |
| 14 | Verify System Ambient Temperature |
| 15 | [Documentation] Check the ambient sensor temperature. |
| 16 | [Tags] Verify_System_Ambient_Temperature |
| 17 | |
| 18 | # Example: |
| 19 | # /xyz/openbmc_project/sensors/temperature/ambient |
| 20 | # { |
| 21 | # "Scale": -3, |
| 22 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", |
| 23 | # "Value": 25767 |
| 24 | # } |
| 25 | |
| 26 | ${temp_data}= Read Properties ${SENSORS_URI}temperature/ambient |
| 27 | Should Be True ${temp_data["Scale"]} == ${-3} |
| 28 | Should Be Equal As Strings |
| 29 | ... ${temp_data["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.DegreesC |
| 30 | Should Be True ${temp_data["Value"]/1000} <= ${50} |
| 31 | ... msg=System working temperature crossed 50 degree celsius. |
| 32 | |
| 33 | |
| 34 | *** Keywords *** |
| 35 | |
| 36 | Pre Test Suite Execution |
| 37 | [Documentation] Do the initial test suite setup. |
| 38 | # - Power off. |
| 39 | # - Boot Host. |
| 40 | REST Power Off stack_mode=skip |
| 41 | REST Power On |
| 42 | |
| 43 | Post Test Case Execution |
| 44 | [Documentation] Do the post test teardown. |
| 45 | # - Capture FFDC on test failure. |
| 46 | # - Delete error logs. |
| 47 | # - Close all open SSH connections. |
| 48 | |
| 49 | FFDC On Test Case Fail |
| 50 | Delete Error Logs |
| 51 | Close All Connections |
| 52 | |