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_methods.robot b/lib/openbmc_ffdc_methods.robot
index 4911469..5a6f5ba 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -176,6 +176,17 @@
... logs/test_history.txt
... Format Date:Test suite:Test case:Status
... 20160909214053719992:Test Warmreset:Test WarmReset via REST:FAIL
+
+ ${FFDC_DIR_PATH_STYLE}= Get Variable Value ${FFDC_DIR_PATH_STYLE}
+ ... ${EMPTY}
+ ${FFDC_DIR_PATH}= Get Variable Value ${FFDC_DIR_PATH} ${EMPTY}
+
+ Run Keyword If '${FFDC_DIR_PATH}' == '${EMPTY}' Set FFDC Defaults
+
+ Run Keyword If '${FFDC_DIR_PATH_STYLE}' == '${1}' Run Keywords
+ ... Set Global Variable ${FFDC_LOG_PATH} ${FFDC_DIR_PATH} AND
+ ... Set Global Variable ${TEST_HISTORY} ${FFDC_DIR_PATH}test_history.txt
+
Create Directory ${FFDC_LOG_PATH}
${exist}= Run Keyword and Return Status
@@ -184,6 +195,8 @@
Run Keyword If '${exist}' == '${False}'
... Create File ${TEST_HISTORY}
+ Rpvars TEST_HISTORY
+
${cur_time}= Get Current Time Stamp
Append To File ${TEST_HISTORY}