FFDC collection fix
Fixes:
- Enforce logging on console quiet mode by default.
- Remove checking for system in bad state "quiesce".
- Delete error log and BMC dumps post FFDC is collected.
This improves FFD execution and contextual errors when collected
when test fails.
Resolves openbmc/openbmc-test-automation#975
Change-Id: I52d113b4cd75bf5feb930905384de74cf58efbe5
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/dump_utils.robot b/lib/dump_utils.robot
index 77887c9..e233898 100644
--- a/lib/dump_utils.robot
+++ b/lib/dump_utils.robot
@@ -53,8 +53,7 @@
[Documentation] Delete all dumps.
# Check if dump entries exist, if not return.
- ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list
- # quiet=${1}
+ ${resp}= OpenBMC Get Request ${DUMP_ENTRY_URI}list quiet=${1}
Return From Keyword If ${resp.status_code} == ${HTTP_NOT_FOUND}
# Get the list of dump entries and delete them all.
diff --git a/lib/openbmc_ffdc.robot b/lib/openbmc_ffdc.robot
index 8b7d442..d016522 100755
--- a/lib/openbmc_ffdc.robot
+++ b/lib/openbmc_ffdc.robot
@@ -31,7 +31,7 @@
Resource openbmc_ffdc_methods.robot
Resource openbmc_ffdc_utils.robot
-Resource state_manager.robot
+Resource dump_utils.robot
Library openbmc_ffdc.py
*** Keywords ***
@@ -41,14 +41,16 @@
... other data collection methods
... 1. Collect Logs if test fails or host reaches quiesced
... state.
- ... 2. Recover host from quiesced state
- ... 3. Added Test execution history logging
+ ... 2. Added test execution history logging.
... By default this will log Test status PASS/FAIL format
... EX: 20160822041250932049:Test:Test case 1:PASS
... 20160822041250969913:Test:Test case 2:FAIL
+ ... 3. Delete error logs and BMC dumps post FFDC collection.
- ${status}= Is Host Quiesced
- Run Keyword If '${TEST_STATUS}' == 'FAIL' or '${status}'=='True' FFDC
- Run Keyword If '${status}'=='True' Recover Quiesced Host
+ Run Keyword If '${TEST_STATUS}' == 'FAIL' FFDC
Log Test Case Status
+
+ # Clean up error logs and BMC dumps.
+ Run Keyword If '${TEST_STATUS}' == 'FAIL'
+ ... Run Keywords Delete Error Logs AND Delete All Dumps