PCIE temperature attribute check
Resolves openbmc/openbmc-test-automation#646
Change-Id: Id3eed1445b5d8eb60af45abbcbb34386f03195e6
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_fan.robot b/tests/test_fan.robot
index 2e950c1..1335ec4 100644
--- a/tests/test_fan.robot
+++ b/tests/test_fan.robot
@@ -12,7 +12,12 @@
[Documentation] Check fan attributes.
[Tags] Verify_Fan_Sensor_Attributes
- ${fans}= Get Fan Sensor List
+ # Example:
+ # /xyz/openbmc_project/sensors/fan_tach/fan0
+ # /xyz/openbmc_project/sensors/fan_tach/fan1
+ # /xyz/openbmc_project/sensors/fan_tach/fan2
+ # /xyz/openbmc_project/sensors/fan_tach/fan3
+ ${fans}= Get Endpoint Paths /xyz/openbmc_project/sensors/ fan*
# Access the properties of the fan and it should contain
# the following entries:
@@ -35,19 +40,33 @@
\ Should Be True ${json["data"]["Value"]} >= 0
+Verify PCIE Sensors Atrributes
+ [Documentation] Probe PCIE attributes.
+ [Tags] Verify_PCIE_Sensor_Attributes
+
+ # Example:
+ # /xyz/openbmc_project/sensors/temperature/pcie
+ ${temp_pcie}= Get Endpoint Paths /xyz/openbmc_project/sensors/ pcie
+
+ # Access the properties of the PCIE and it should contain
+ # the following entries:
+ # /xyz/openbmc_project/sensors/temperature/pcie
+ # {
+ # "Scale": -3,
+ # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC",
+ # "Value": 29625
+ # }
+
+
+ :FOR ${entry} IN @{temp_pcie}
+ \ ${resp}= OpenBMC Get Request ${entry}
+ \ ${json}= To Json ${resp.content}
+ \ Should Be True ${json["data"]["Scale"]} == -3
+ \ Should Be Equal As Strings
+ ... ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.DegreesC
+ \ ${temp_in_DegreeC}= Evaluate ${json["data"]["Value"]} / 1000
+ \ Should Be True ${temp_in_DegreeC} > 0
+
+
*** Keywords ***
-Get Fan Sensor List
- [Documentation] Get a list of fan sensor URLs.
- # Example:
- # /xyz/openbmc_project/sensors/fan_tach/fan0
- # /xyz/openbmc_project/sensors/fan_tach/fan1
- # /xyz/openbmc_project/sensors/fan_tach/fan2
- # /xyz/openbmc_project/sensors/fan_tach/fan3
-
- ${resp}= Openbmc Get Request
- ... /xyz/openbmc_project/sensors/fan_tach/list
- Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ${jsondata}= To JSON ${resp.content}
- Should Not Be Empty ${jsondata["data"]}
- [Return] ${jsondata["data"]}