Model string and PNOR details fix
Resolves openbmc/openbmc-test-automation#370
Change-Id: Ia856e5d3a47695d7548f246ff51dda1636e7e0a2
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 3e4063a..2697142 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -37,8 +37,8 @@
Get BMC System Model
[Documentation] Get the BMC model from the device tree.
- ${bmc_model} ${stderr}= Execute Command cat ${devicetree_base} | cut -f 1
- ... -d ${SPACE} return_stderr=True
+ ${bmc_model} ${stderr}= Execute Command
+ ... cat ${devicetree_base} | cut -d " " -f 1 return_stderr=True
Should Be Empty ${stderr}
Should Not Be Empty ${bmc_model}
[Return] ${bmc_model}
diff --git a/tests/__init__.robot b/tests/__init__.robot
index c2ee90a..cf6a589 100644
--- a/tests/__init__.robot
+++ b/tests/__init__.robot
@@ -11,6 +11,7 @@
*** Variables ***
${DRIVER_CMD} cat /etc/os-release | grep ^VERSION_ID=
+${PNOR_CMD} /usr/sbin/pflash -r /tmp/out.txt -P VERSION; cat /tmp/out.txt
*** Keyword ***
@@ -34,20 +35,10 @@
Log PNOR Driver Details
[Documentation] Get PNOR driver details and log.
- ${resp}=
- ... OpenBMC Get Request ${INVENTORY_URI}system/bios
- Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
- ${jsondata}= To Json ${resp.content}
- Log ${jsondata["data"]["Name"]}
- Log ${jsondata["data"]["Version"]}
- Log ${jsondata["data"]["Custom Field 1"]}
- Log ${jsondata["data"]["Custom Field 2"]}
- Log ${jsondata["data"]["Custom Field 3"]}
- Log ${jsondata["data"]["Custom Field 4"]}
- Log ${jsondata["data"]["Custom Field 5"]}
- Log ${jsondata["data"]["Custom Field 6"]}
- Log ${jsondata["data"]["Custom Field 7"]}
- Log ${jsondata["data"]["Custom Field 8"]}
+ # Until the new REST interface is available using pflash to
+ # capture the PNOR details.
+ ${pnor_details}= Execute Command On BMC ${PNOR_CMD}
+ Log PNOR_INFO=${pnor_details}
Log BMC Model