Record soft_errors for use by caller

Certain functions will tolerate failures by design.  FFDC collection is one
such function.  This means that even when there are errors in FFDC collection,
obmc_boot_test.py returns zero.

The problem with this is that calling programs have no indication that anything
may have gone wrong.  Such programs may wish to handle output data differently
under such circumstances.

Changes have been made to use the save_plug_in_value function to record the
fact that "soft" errors have occurred.  It is true that obmc_boot_test.py is
not actually a plug-in. However, the save_plug_in_value function works
beautifully for this purpose.

Change-Id: Ice953bf4957464d16382061b75906b02b5f94fef
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index a575d79..e864571 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -29,6 +29,7 @@
 import gen_robot_keyword as grk
 import state as st
 import var_stack as vs
+import gen_plug_in_utils as gpu
 
 base_path = os.path.dirname(os.path.dirname(
                             imp.find_module("gen_robot_print")[1])) +\
@@ -750,6 +751,11 @@
                                            + ffdc_function_list, ignore=1)
     if status != 'PASS':
         gp.qprint_error("Call to ffdc failed.\n")
+        if type(ffdc_file_list) is not list:
+            ffdc_file_list = []
+        # Leave a record for caller that "soft" errors occurred.
+        soft_errors = 1
+        gpu.save_plug_in_value(soft_errors, pgm_name)
 
     my_get_state()
 
@@ -949,6 +955,9 @@
         status, ret_values = grk.run_key_u("my_ffdc", ignore=1)
         if status != 'PASS':
             gp.qprint_error("Call to my_ffdc failed.\n")
+            # Leave a record for caller that "soft" errors occurred.
+            soft_errors = 1
+            gpu.save_plug_in_value(soft_errors, pgm_name)
 
     if delete_errlogs:
         # We need to purge error logs between boots or they build up.
@@ -1059,6 +1068,9 @@
         status, ret_values = grk.run_key_u("my_ffdc", ignore=1)
         if status != 'PASS':
             gp.qprint_error("Call to my_ffdc failed.\n")
+            # Leave a record for caller that "soft" errors occurred.
+            soft_errors = 1
+            gpu.save_plug_in_value(soft_errors, pgm_name)
 
     plug_in_setup()
     rc, shell_rc, failed_plug_in_name = grpi.rprocess_plug_in_packages(