Collect the BMC dump if exists during FFDC collection.
Resolves openbmc/openbmc-test-automation#981
Change-Id: I4c1490333fa8e0701e682e56894f0d496dd4c16d
Signed-off-by: Sweta Potthuri <spotthur@in.ibm.com>
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index 682e96b..b007718 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -12,6 +12,7 @@
Library String
Library gen_print.py
Library gen_robot_keyword.py
+Library dump_utils.py
*** Keywords ***
@@ -430,6 +431,27 @@
[Return] ${ffdc_file_list}
+SCP Dump Files
+ [Documentation] Copy all dump files from BMC to local system.
+
+ # Check if dumps exist
+ ${ffdc_file_list}= Scp Dumps ${FFDC_DIR_PATH} ${FFDC_PREFIX}
+
+ [Return] ${ffdc_file_list}
+
+Collect Dump Log
+ [Documentation] Collect dumps from dump entry.
+ [Arguments] ${log_prefix_path}=${LOG_PREFIX}
+
+ ${data}= Read Properties ${DUMP_ENTRY_URI}/enumerate quiet=${1}
+
+ # Grab the list of entries from dump/entry/
+ # The data shown below is the result of the "Get Dictionary Keys".
+ # Example:
+ # /xyz/openbmc_project/dump/entry/1
+ # /xyz/openbmc_project/dump/entry/2
+
+ ${dump_list}= Get Dictionary Keys ${data}
Collect eSEL Log
[Documentation] Collect eSEL log from logging entry and convert eSEL data