blob: 48fff1355951a6f6de87a68e56bff7c8ce5aa07f [file] [log] [blame]
George Keishing06572472017-09-01 11:33:01 -05001*** Settings ***
2Documentation Suite to test harware sensors.
3
4Resource ../lib/utils.robot
5Resource ../lib/boot_utils.robot
6Resource ../lib/state_manager.robot
7Resource ../lib/openbmc_ffdc.robot
8
9Suite Setup Pre Test Suite Execution
10Test Teardown Post Test Case Execution
11
12*** Test Cases ***
13
14Verify 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
36Pre 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
43Post 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