Changes to FFDC to support ffdc_dir_path and ffdc_prefix as parms.
lib/openbmc_ffdc.py
- New py counterpart to openbmc_ffdc.robot. Converted ffdc keyword to
python. I did this as an effort to reduce dependencies on global
variables like FFDC_DIR_PATH, FFDC_LOG_PATH, etc and to support
ffdc_dir_path and ffdc_prefix as parms to the keyword.
lib/openbmc_ffdc.robot:
- Added line to bring in new lib/openbmc_ffdc.py.
- Removed ROBOT version of FFDC keyword.
Change-Id: Ic82255f4fbba3b0e6e8eb7faa942c948ce6a522d
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/openbmc_ffdc.robot b/lib/openbmc_ffdc.robot
index d1b67f5..cf90cc4 100755
--- a/lib/openbmc_ffdc.robot
+++ b/lib/openbmc_ffdc.robot
@@ -30,6 +30,7 @@
Resource openbmc_ffdc_methods.robot
Resource openbmc_ffdc_utils.robot
+Library openbmc_ffdc.py
*** Keywords ***
@@ -46,34 +47,3 @@
... FFDC
Log Test Case Status
-
-
-FFDC
- [Documentation] Main entry point to gather logs on Test case failure
- ... 1. Set global FFDC time reference for a failure
- ... 2. Create FFDC work space directory
- ... 3. Write test info details
- ... 4. Calls BMC methods to write/collect FFDC data
-
- ${cur_time}= Get Current Time Stamp
- Set Global Variable ${FFDC_TIME} ${cur_time}
- Log To Console ${\n}FFDC Collection Started \t: ${cur_time}
-
- # Log directory setup
- ${suitename} ${testname}= Get Test Dir and Name
-
- Set Global Variable
- ... ${FFDC_DIR_PATH} ${FFDC_LOG_PATH}${suitename}${/}${testname}
-
- ${prefix}= Catenate SEPARATOR= ${FFDC_DIR_PATH}${/} ${FFDC_TIME}_
- Set Global Variable ${LOG_PREFIX} ${prefix}
-
- Create FFDC Directory
- Header Message
-
- # -- FFDC processing entry point --
- Call FFDC Methods
-
- ${cur_time}= Get Current Time Stamp
- Log To Console FFDC Collection Completed \t: ${cur_time}
- Log ${\n}${FFDC_DIR_PATH}