Made deletion of errlogs optional with default of ${0}.
Resolves https://github.com/openbmc/openbmc-test-automation/issues/987
Change-Id: Iadc017592267088fff1d65d1cd419a151dd23705
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/obmc_boot_test.py b/lib/obmc_boot_test.py
index 578e7eb..8c76f84 100755
--- a/lib/obmc_boot_test.py
+++ b/lib/obmc_boot_test.py
@@ -129,7 +129,8 @@
parm_list = BuiltIn().get_variable_value("${parm_list}")
# The following subset of parms should be processed as integers.
int_list = ['max_num_tests', 'boot_pass', 'boot_fail', 'ffdc_only',
- 'boot_fail_threshold', 'quiet', 'test_mode', 'debug']
+ 'boot_fail_threshold', 'delete_errlogs', 'quiet', 'test_mode',
+ 'debug']
for parm in parm_list:
if parm in int_list:
sub_cmd = "int(BuiltIn().get_variable_value(\"${" + parm +\
@@ -887,8 +888,9 @@
if status != 'PASS':
gp.qprint_error("Call to my_ffdc failed.\n")
- # We need to purge error logs between boots or they build up.
- grk.run_key("Delete Error logs", ignore=1)
+ if delete_errlogs:
+ # We need to purge error logs between boots or they build up.
+ grk.run_key("Delete Error logs", ignore=1)
boot_results.print_report()
gp.qprint_timen("Finished boot " + str(boot_count) + ".")