[PATCH openbmc-test-automation 40/60] Added DIMM specific inventory tests
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Jan 12 03:50:06 AEDT 2016
From: Chris Austen <austenc at us.ibm.com>
---
data/variables.py | 28 ++++++++++++++++++++++++----
tests/test_inventory.robot | 43 ++++++++++++++++++++++++++++++++++++++++---
2 files changed, 64 insertions(+), 7 deletions(-)
diff --git a/data/variables.py b/data/variables.py
index 099a21e..a70367c 100644
--- a/data/variables.py
+++ b/data/variables.py
@@ -15,8 +15,8 @@ INVENTORY={
"/org/openbmc/inventory/system/chassis/motherboard/dimm2",
"/org/openbmc/inventory/system/chassis/motherboard/dimm1",
"/org/openbmc/inventory/system/chassis/motherboard/dimm0",
- "/org/openbmc/inventory/system/chassis/fan4",
- "/org/openbmc/inventory/system/chassis/fan2",
+ "/org/openbmc/inventory/system/chassis/fan4",
+ "/org/openbmc/inventory/system/chassis/fan2",
"/org/openbmc/inventory/system",
"/org/openbmc/inventory/system/chassis/fan0",
"/org/openbmc/inventory/system/chassis/fan1",
@@ -27,5 +27,25 @@ INVENTORY={
"/org/openbmc/inventory/system/chassis/motherboard/centaur0",
"/org/openbmc/inventory/system/chassis/motherboard",
"/org/openbmc/inventory/system/chassis/motherboard/bmc",
- "/org/openbmc/inventory/system/chassis/fan3"]
-}
\ No newline at end of file
+ "/org/openbmc/inventory/system/chassis/fan3"],
+
+ "DIMM" : [ "Asset Tag",
+ "Custom Field 1",
+ "Custom Field 2",
+ "Custom Field 3",
+ "Custom Field 4",
+ "Custom Field 5",
+ "Custom Field 6",
+ "Custom Field 7",
+ "Custom Field 8",
+ "FRU File ID",
+ "Manufacturer",
+ "Model Number",
+ "Name",
+ "Serial Number",
+ "Version",
+ "fault",
+ "fru_type",
+ "is_fru",
+ "present"],
+}
diff --git a/tests/test_inventory.robot b/tests/test_inventory.robot
index 2e5bfaa..f326a72 100644
--- a/tests/test_inventory.robot
+++ b/tests/test_inventory.robot
@@ -6,11 +6,48 @@ Resource ../lib/resource.txt
*** Test Cases ***
List Inventory
- [Documentation] This testcase will get the inventory for the openbmc
- ... machine and validates with the expected inventory
- ${resp} = OpenBMC Get Request org/openbmc/inventory/list
+ ${resp} = OpenBMC Get Request /org/openbmc/inventory/list
Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
${jsondata}= To Json ${resp.content}
${ret}= Get Inventory Schema ${MACHINE_TYPE}
: FOR ${ELEMENT} IN @{ret}
\ Should Contain ${jsondata} ${ELEMENT}
+
+
+Verify dimm0 vpd
+ ${value} = Read attribute /org/openbmc/inventory/system/chassis/motherboard/dimm0 fru_type
+ Should Be Equal ${value} "DIMM"
+
+
+Verify dimm1 vpd
+ ${value} = Read attribute /org/openbmc/inventory/system/chassis/motherboard/dimm1 fru_type
+ Should Be Equal ${value} "DIMM"
+
+Verify dimm0 properties
+ ${props} = Read Properties /org/openbmc/inventory/system/chassis/motherboard/dimm0
+ Should Be Valid Dimm Properties ${props}
+
+Verify dimm1 properties
+ ${props} = Read Properties /org/openbmc/inventory/system/chassis/motherboard/dimm1
+ Should Be Valid Dimm Properties ${props}
+
+
+
+*** Keywords ***
+Should Be Valid Dimm Properties
+ [arguments] ${props}
+ ${ret}= Get Inventory Schema DIMM
+ : FOR ${ELEMENT} IN @{ret}
+ \ Should Contain ${props} ${ELEMENT}
+
+
+Read attribute
+ [arguments] ${uri} ${attr}
+ ${resp} = OpenBMC Get Request ${uri}/attr/${attr}
+ [return] ${resp.content}
+
+
+Read Properties
+ [arguments] ${uri}
+ ${resp} = OpenBMC Get Request ${uri}
+ [return] ${resp.content}
--
2.6.4
More information about the openbmc
mailing list