Pickle last_ten object

Pickle the last_ten object along with boot_results table.  This will
give more complete results in the "Last 10 boots" section of a defect
report.

In the following example, if the "IPMI Power Off" test was done on a
prior obmc_boot_test.py invocation under the same master pid, it will
now be included as one of the last 10 boots.

Last 10 boots:

(CDT) 2018/08/17 15:00:16.544687 - Doing "IPMI Power Off".
(CDT) 2018/08/17 15:00:24.614543 - Doing "REST Power Off".

Change-Id: Icffa25cee58fed4df6b9284e93785e45b4a118c8
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 073e062..2fd33dc 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -152,6 +152,7 @@
     global boot_stack
     global boot_results_file_path
     global boot_results
+    global last_ten
     global ffdc_list_file_path
     global ffdc_report_list_path
     global ffdc_summary_list_path
@@ -170,8 +171,9 @@
 
     if os.path.isfile(boot_results_file_path):
         # We've been called before in this run so we'll load the saved
-        # boot_results object.
-        boot_results = pickle.load(open(boot_results_file_path, 'rb'))
+        # boot_results and last_ten objects.
+        boot_results, last_ten =\
+            pickle.load(open(boot_results_file_path, 'rb'))
     else:
         boot_results = boot_results(boot_table, boot_pass, boot_fail)
 
@@ -884,10 +886,12 @@
             call_point='cleanup', stop_on_plug_in_failure=0)
 
     if 'boot_results_file_path' in globals():
-        # Save boot_results object to a file in case it is needed again.
+        # Save boot_results and last_ten objects to a file in case they are
+        # needed again.
         gp.qprint_timen("Saving boot_results to the following path.")
         gp.qprint_var(boot_results_file_path)
-        pickle.dump(boot_results, open(boot_results_file_path, 'wb'),
+        pickle.dump((boot_results, last_ten),
+                    open(boot_results_file_path, 'wb'),
                     pickle.HIGHEST_PROTOCOL)
 
     global save_stack