Allow 'Log Test Case Status' to pay heed to ffdc_dir_path_style.
ffdc_dir_path_style allows for a different scheme for FFDC locations
and names. It isn't always prudent to write logs to the same path
as the git repo.
Change-Id: Id69b5aff678f81f4cb35675e131d7555d8545405
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/openbmc_ffdc.py b/lib/openbmc_ffdc.py
index 36c011c..314cacf 100644
--- a/lib/openbmc_ffdc.py
+++ b/lib/openbmc_ffdc.py
@@ -55,13 +55,6 @@
grp.rprint_timen("Collecting FFDC.")
- # Note: Several subordinate functions like 'Get Test Dir and Name' and
- # 'Header Message' expect global variable FFDC_TIME to be set.
- cmd_buf = ["Get Current Time Stamp"]
- grp.rdpissuing_keyword(cmd_buf)
- FFDC_TIME = BuiltIn().run_keyword(*cmd_buf)
- BuiltIn().set_global_variable("${FFDC_TIME}", FFDC_TIME)
-
# Get default values for arguments.
ffdc_dir_path, ffdc_prefix = set_ffdc_defaults(ffdc_dir_path, ffdc_prefix)
grp.rprint_var(ffdc_dir_path)
@@ -111,6 +104,13 @@
will remain unchanged.
"""
+ # Note: Several subordinate functions like 'Get Test Dir and Name' and
+ # 'Header Message' expect global variable FFDC_TIME to be set.
+ cmd_buf = ["Get Current Time Stamp"]
+ grp.rdpissuing_keyword(cmd_buf)
+ FFDC_TIME = BuiltIn().run_keyword(*cmd_buf)
+ BuiltIn().set_global_variable("${FFDC_TIME}", FFDC_TIME)
+
ffdc_dir_path_style = BuiltIn().get_variable_value(
"${ffdc_dir_path_style}")
@@ -156,6 +156,9 @@
else:
ffdc_prefix = FFDC_TIME + "_"
+ BuiltIn().set_global_variable("${FFDC_DIR_PATH}", ffdc_dir_path)
+ BuiltIn().set_global_variable("${FFDC_PREFIX}", ffdc_prefix)
+
return ffdc_dir_path, ffdc_prefix
###############################################################################