| Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 1 | *** Settings *** | 
| George Keishing | 47335a7 | 2017-05-09 04:02:18 -0500 | [diff] [blame] | 2 | Documentation     Test module for testing fan interface. | 
|  | 3 |  | 
| Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 4 | Resource          ../lib/rest_client.robot | 
| George Keishing | d55a4be | 2016-08-26 03:28:17 -0500 | [diff] [blame] | 5 | Resource          ../lib/openbmc_ffdc.robot | 
| George Keishing | 47335a7 | 2017-05-09 04:02:18 -0500 | [diff] [blame] | 6 |  | 
| Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 7 | Test Teardown     FFDC On Test Case Fail | 
| Chris Austen | b29d2e8 | 2016-06-07 12:25:35 -0500 | [diff] [blame] | 8 |  | 
|  | 9 | *** Test Cases *** | 
| George Keishing | 47335a7 | 2017-05-09 04:02:18 -0500 | [diff] [blame] | 10 |  | 
| George Keishing | ee5c9f5 | 2017-05-26 03:39:20 -0500 | [diff] [blame] | 11 | Verify Fan Sensors Attributes | 
| George Keishing | 47335a7 | 2017-05-09 04:02:18 -0500 | [diff] [blame] | 12 | [Documentation]  Check fan attributes. | 
|  | 13 | [Tags]  Verify_Fan_Sensor_Attributes | 
|  | 14 |  | 
| George Keishing | 9994a50 | 2017-05-22 14:34:41 -0500 | [diff] [blame] | 15 | # Example: | 
|  | 16 | # /xyz/openbmc_project/sensors/fan_tach/fan0 | 
|  | 17 | # /xyz/openbmc_project/sensors/fan_tach/fan1 | 
|  | 18 | # /xyz/openbmc_project/sensors/fan_tach/fan2 | 
|  | 19 | # /xyz/openbmc_project/sensors/fan_tach/fan3 | 
|  | 20 | ${fans}=  Get Endpoint Paths  /xyz/openbmc_project/sensors/  fan* | 
| George Keishing | 47335a7 | 2017-05-09 04:02:18 -0500 | [diff] [blame] | 21 |  | 
|  | 22 | # Access the properties of the fan and it should contain | 
|  | 23 | # the following entries: | 
|  | 24 | # /xyz/openbmc_project/sensors/fan_tach/fan0 | 
|  | 25 | # { | 
|  | 26 | #     "Scale": 0, | 
|  | 27 | #     "Target": 0, | 
|  | 28 | #     "Unit": "xyz.openbmc_project.Sensor.Value.Unit.RPMS", | 
|  | 29 | #     "Value": 0 | 
|  | 30 | # } | 
|  | 31 |  | 
|  | 32 | :FOR  ${entry}  IN  @{fans} | 
|  | 33 | \  ${resp}=  OpenBMC Get Request  ${entry} | 
| George Keishing | ee5c9f5 | 2017-05-26 03:39:20 -0500 | [diff] [blame] | 34 | \  ${json}=  To JSON  ${resp.content} | 
| George Keishing | 47335a7 | 2017-05-09 04:02:18 -0500 | [diff] [blame] | 35 | \  Should Be True  ${json["data"]["Scale"]} >= 0 | 
| George Keishing | 16294f6 | 2017-05-12 14:48:50 -0500 | [diff] [blame] | 36 | \  Run Keyword And Ignore Error | 
|  | 37 | ...  Should Be True  ${json["data"]["Target"]} >= 0 | 
| George Keishing | 47335a7 | 2017-05-09 04:02:18 -0500 | [diff] [blame] | 38 | \  Should Be Equal As Strings | 
|  | 39 | ...  ${json["data"]["Unit"]}  xyz.openbmc_project.Sensor.Value.Unit.RPMS | 
|  | 40 | \  Should Be True  ${json["data"]["Value"]} >= 0 | 
|  | 41 |  | 
|  | 42 |  | 
| George Keishing | ee5c9f5 | 2017-05-26 03:39:20 -0500 | [diff] [blame] | 43 | Verify PCIE Sensors Attributes | 
| George Keishing | 9994a50 | 2017-05-22 14:34:41 -0500 | [diff] [blame] | 44 | [Documentation]  Probe PCIE attributes. | 
|  | 45 | [Tags]  Verify_PCIE_Sensor_Attributes | 
|  | 46 |  | 
|  | 47 | # Example: | 
|  | 48 | # /xyz/openbmc_project/sensors/temperature/pcie | 
|  | 49 | ${temp_pcie}=  Get Endpoint Paths  /xyz/openbmc_project/sensors/  pcie | 
|  | 50 |  | 
|  | 51 | # Access the properties of the PCIE and it should contain | 
|  | 52 | # the following entries: | 
|  | 53 | # /xyz/openbmc_project/sensors/temperature/pcie | 
|  | 54 | # { | 
|  | 55 | #    "Scale": -3, | 
|  | 56 | #    "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", | 
|  | 57 | #    "Value": 29625 | 
|  | 58 | # } | 
|  | 59 |  | 
|  | 60 |  | 
|  | 61 | :FOR  ${entry}  IN  @{temp_pcie} | 
|  | 62 | \  ${resp}=  OpenBMC Get Request  ${entry} | 
| George Keishing | ee5c9f5 | 2017-05-26 03:39:20 -0500 | [diff] [blame] | 63 | \  ${json}=  To JSON  ${resp.content} | 
| George Keishing | 9994a50 | 2017-05-22 14:34:41 -0500 | [diff] [blame] | 64 | \  Should Be True  ${json["data"]["Scale"]} == -3 | 
|  | 65 | \  Should Be Equal As Strings | 
|  | 66 | ...  ${json["data"]["Unit"]}  xyz.openbmc_project.Sensor.Value.Unit.DegreesC | 
|  | 67 | \  ${temp_in_DegreeC}=  Evaluate  ${json["data"]["Value"]} / 1000 | 
|  | 68 | \  Should Be True  ${temp_in_DegreeC} > 0 | 
|  | 69 |  | 
|  | 70 |  | 
| George Keishing | ee5c9f5 | 2017-05-26 03:39:20 -0500 | [diff] [blame] | 71 | Verify Rail Voltage Sensors Attributes | 
|  | 72 | [Documentation]  Check rail voltage attributes. | 
|  | 73 | [Tags]  Verify_Rail_Voltage_Sensor_Attributes | 
|  | 74 |  | 
|  | 75 | # Example of one of the entries returned by 'Get Endpoint Paths': | 
|  | 76 | # /xyz/openbmc_project/sensors/voltage/rail_1_voltage | 
|  | 77 | # /xyz/openbmc_project/sensors/voltage/rail_2_voltage | 
|  | 78 | ${temp_rail}=  Get Endpoint Paths  /xyz/openbmc_project/sensors/  rail* | 
|  | 79 |  | 
|  | 80 | # Example: | 
|  | 81 | # Access the properties of the rail voltage and it should contain | 
|  | 82 | # the following entries: | 
|  | 83 | # "/xyz/openbmc_project/sensors/voltage/rail_1_voltage": | 
|  | 84 | # { | 
|  | 85 | #    "Scale": -3, | 
|  | 86 | #    "Unit": "xyz.openbmc_project.Sensor.Value.Unit.Volts", | 
|  | 87 | #    "Value": 5097 | 
|  | 88 | # }, | 
|  | 89 |  | 
|  | 90 | :FOR  ${entry}  IN  @{temp_rail} | 
|  | 91 | \  ${resp}=  OpenBMC Get Request  ${entry} | 
|  | 92 | \  ${json}=  To JSON  ${resp.content} | 
|  | 93 | \  Should Be True  ${json["data"]["Scale"]} == -3 | 
|  | 94 | \  Should Be Equal As Strings | 
|  | 95 | ...  ${json["data"]["Unit"]}  xyz.openbmc_project.Sensor.Value.Unit.Volts | 
|  | 96 | \  ${volts}=  Evaluate  ${json["data"]["Value"]} / 1000 | 
|  | 97 | \  Should Be True  ${volts} > 0 | 
|  | 98 |  | 
|  | 99 |  | 
| George Keishing | b08be1b | 2017-06-19 04:57:47 -0500 | [diff] [blame] | 100 | Verify VDN Temperature Sensors Attributes | 
|  | 101 | [Documentation]  Check vdn temperature attributes. | 
|  | 102 | [Tags]  Verify_VDN_Temperature_Sensors_Attributes | 
|  | 103 |  | 
|  | 104 | # Example of one of the entries returned by 'Get Endpoint Paths': | 
|  | 105 | # /xyz/openbmc_project/sensors/temperature/p0_vdn_temp | 
|  | 106 | ${temp_vdn}=  Get Endpoint Paths  /xyz/openbmc_project/sensors/  *_vdn_temp | 
|  | 107 |  | 
|  | 108 | # Example: | 
|  | 109 | # Access the properties of the rail voltage and it should contain | 
|  | 110 | # the following entries: | 
|  | 111 | # /xyz/openbmc_project/sensors/temperature/p0_vdn_temp | 
|  | 112 | # { | 
|  | 113 | #    "Scale": -3, | 
|  | 114 | #    "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", | 
|  | 115 | #    "Value": 3000 | 
|  | 116 | # } | 
|  | 117 |  | 
|  | 118 | :FOR  ${entry}  IN  @{temp_vdn} | 
|  | 119 | \  ${resp}=  OpenBMC Get Request  ${entry} | 
|  | 120 | \  ${json}=  To JSON  ${resp.content} | 
|  | 121 | \  Should Be True  ${json["data"]["Scale"]} == -3 | 
|  | 122 | \  Should Be Equal As Strings | 
|  | 123 | ...  ${json["data"]["Unit"]}  xyz.openbmc_project.Sensor.Value.Unit.DegreesC | 
|  | 124 | \  ${vdn_temp}=  Evaluate  ${json["data"]["Value"]} / 1000 | 
|  | 125 | \  Should Be True  ${vdn_temp} > 0 | 
|  | 126 |  | 
|  | 127 |  | 
|  | 128 | Verify VCS Temperature Sensors Attributes | 
|  | 129 | [Documentation]  Check vcs temperature attributes. | 
|  | 130 | [Tags]  Verify_VCS_Temperature_Sensors_Attributes | 
|  | 131 |  | 
|  | 132 | # Example of one of the entries returned by 'Get Endpoint Paths': | 
|  | 133 | # /xyz/openbmc_project/sensors/temperature/p0_vcs_temp | 
|  | 134 | ${temp_vcs}=  Get Endpoint Paths  /xyz/openbmc_project/sensors/  *_vcs_temp | 
|  | 135 |  | 
|  | 136 | # Example: | 
|  | 137 | # Access the properties of the rail voltage and it should contain | 
|  | 138 | # the following entries: | 
|  | 139 | # /xyz/openbmc_project/sensors/temperature/p0_vcs_temp | 
|  | 140 | # { | 
|  | 141 | #     "Scale": -3, | 
|  | 142 | #     "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", | 
|  | 143 | #     "Value": 31000 | 
|  | 144 | # }, | 
|  | 145 |  | 
|  | 146 |  | 
|  | 147 | :FOR  ${entry}  IN  @{temp_vcs} | 
|  | 148 | \  ${resp}=  OpenBMC Get Request  ${entry} | 
|  | 149 | \  ${json}=  To JSON  ${resp.content} | 
|  | 150 | \  Should Be True  ${json["data"]["Scale"]} == -3 | 
|  | 151 | \  Should Be Equal As Strings | 
|  | 152 | ...  ${json["data"]["Unit"]}  xyz.openbmc_project.Sensor.Value.Unit.DegreesC | 
|  | 153 | \  ${vcs_temp}=  Evaluate  ${json["data"]["Value"]} / 1000 | 
|  | 154 | \  Should Be True  ${vcs_temp} > 0 | 
|  | 155 |  | 
|  | 156 |  | 
|  | 157 | Verify VDD Temperature Sensors Attributes | 
|  | 158 | [Documentation]  Check vdd temperature attributes. | 
|  | 159 | [Tags]  Verify_VDD_Temperature_Sensors_Attributes | 
|  | 160 |  | 
|  | 161 | # Example of one of the entries returned by 'Get Endpoint Paths': | 
|  | 162 | # /xyz/openbmc_project/sensors/temperature/p0_vdd_temp | 
|  | 163 | ${temp_vdd}=  Get Endpoint Paths  /xyz/openbmc_project/sensors/  *_vdd_temp | 
|  | 164 |  | 
|  | 165 | # Example: | 
|  | 166 | # Access the properties of the rail voltage and it should contain | 
|  | 167 | # the following entries: | 
|  | 168 | # /xyz/openbmc_project/sensors/temperature/p0_vdd_temp | 
|  | 169 | # { | 
|  | 170 | #     "Scale": -3, | 
|  | 171 | #     "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", | 
|  | 172 | #     "Value": 4000 | 
|  | 173 | # } | 
|  | 174 |  | 
|  | 175 | :FOR  ${entry}  IN  @{temp_vdd} | 
|  | 176 | \  ${resp}=  OpenBMC Get Request  ${entry} | 
|  | 177 | \  ${json}=  To JSON  ${resp.content} | 
|  | 178 | \  Should Be True  ${json["data"]["Scale"]} == -3 | 
|  | 179 | \  Should Be Equal As Strings | 
|  | 180 | ...  ${json["data"]["Unit"]}  xyz.openbmc_project.Sensor.Value.Unit.DegreesC | 
|  | 181 | \  ${vdd_temp}=  Evaluate  ${json["data"]["Value"]} / 1000 | 
|  | 182 | \  Should Be True  ${vdd_temp} > 0 | 
|  | 183 |  | 
|  | 184 |  | 
|  | 185 | Verify VDDR Temperature Sensors Attributes | 
|  | 186 | [Documentation]  Check vddr temperature attributes. | 
|  | 187 | [Tags]  Verify_VDDR_Temperature_Sensors_Attributes | 
|  | 188 |  | 
|  | 189 | # Example of one of the entries returned by 'Get Endpoint Paths': | 
|  | 190 | # /xyz/openbmc_project/sensors/temperature/p0_vddr_temp | 
|  | 191 | ${temp_vddr}= | 
|  | 192 | ...  Get Endpoint Paths  /xyz/openbmc_project/sensors/  *_vddr_temp | 
|  | 193 |  | 
|  | 194 | # Example: | 
|  | 195 | # Access the properties of the rail voltage and it should contain | 
|  | 196 | # the following entries: | 
|  | 197 | # /xyz/openbmc_project/sensors/temperature/p0_vddr_temp | 
|  | 198 | # { | 
|  | 199 | #     "Scale": -3, | 
|  | 200 | #     "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", | 
|  | 201 | #     "Value": 4000 | 
|  | 202 | # } | 
|  | 203 |  | 
|  | 204 | :FOR  ${entry}  IN  @{temp_vddr} | 
|  | 205 | \  ${resp}=  OpenBMC Get Request  ${entry} | 
|  | 206 | \  ${json}=  To JSON  ${resp.content} | 
|  | 207 | \  Should Be True  ${json["data"]["Scale"]} == -3 | 
|  | 208 | \  Should Be Equal As Strings | 
|  | 209 | ...  ${json["data"]["Unit"]}  xyz.openbmc_project.Sensor.Value.Unit.DegreesC | 
|  | 210 | \  ${vddr_temp}=  Evaluate  ${json["data"]["Value"]} / 1000 | 
|  | 211 | \  Should Be True  ${vddr_temp} > 0 | 
|  | 212 |  | 
|  | 213 |  | 
| George Keishing | 47335a7 | 2017-05-09 04:02:18 -0500 | [diff] [blame] | 214 | *** Keywords *** | 
|  | 215 |  |