Check if PNOR update is corrupted using pflash

Resolves  openbmc/openbmc-test-automation#638

Change-Id: I2fe9941773591074c6facfee5bb359368e170901
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/test_bios_update.robot b/extended/test_bios_update.robot
index d8805b7..fe04f87 100644
--- a/extended/test_bios_update.robot
+++ b/extended/test_bios_update.robot
@@ -23,6 +23,8 @@
 ${stack_mode}           skip
 ${update_status}        True
 
+${pflash_cmd}           /usr/sbin/pflash -r /dev/stdout -P VERSION
+
 *** Test Cases ***
 
 Host BIOS Update
@@ -32,6 +34,7 @@
     Validate Parameters
     Prepare BMC For Update
     Update PNOR Image
+    Verify PNOR Update
 
 Host BIOS Power On
     [Documentation]  Power On the system and wait for OS
@@ -41,6 +44,16 @@
 
 *** Keywords ***
 
+Verify PNOR Update
+    [Documentation]  Verify that the PNOR is not corrupted.
+    # Example:
+    # FFS: Flash header not found. Code: 100
+    # Error 100 opening ffs !
+
+    Open Connection And Log In
+    ${pnor_info}=  Execute Command On BMC  ${pflash_cmd}
+    Should Not Contain Any  ${pnor_info}  Flash header not found  Error
+
 Prepare BMC For Update
     [Documentation]  Prepare system for PNOR update.