IPMI SOL log file path default
Changes:
- Default the SOL in user execution directory logs/
- Update Power on and off to use IPMI methods
This changes is to avoid leaving files under /tmp/ which will
eventually flush on the reboot but user using server running
the test hardly reboot the system. The existing scheme works
ok if running on local or docker instances but still not a
good idea to dump onto /tmp/.
Resolves openbmc/openbmc-test-automation#2132
Change-Id: Ia699f7faf0df1badc5fcd37b638dc0008ae2bc5f
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/ipmi_client.robot b/lib/ipmi_client.robot
index 9afe56e..282a3bb 100755
--- a/lib/ipmi_client.robot
+++ b/lib/ipmi_client.robot
@@ -187,13 +187,13 @@
Activate SOL Via IPMI
[Documentation] Start SOL using IPMI and route output to a file.
- [Arguments] ${file_path}=/tmp/sol_${OPENBMC_HOST}
+ [Arguments] ${file_path}=${IPMI_SOL_LOG_FILE}
# Description of argument(s):
# file_path The file path on the local machine (vs.
# OBMC) to collect SOL output. By default
# SOL output is collected at
- # /tmp/sol_<BMC_IP> else user input location.
+ # logs/sol_<BMC_IP> else user input location.
${ipmi_cmd}= Create IPMI Ext Command String sol activate usesolkeepalive
Qprint Issuing ${ipmi_cmd}
@@ -203,13 +203,13 @@
Deactivate SOL Via IPMI
[Documentation] Stop SOL using IPMI and return SOL output.
- [Arguments] ${file_path}=/tmp/sol_${OPENBMC_HOST}
+ [Arguments] ${file_path}=${IPMI_SOL_LOG_FILE}
# Description of argument(s):
# file_path The file path on the local machine to copy
# SOL output collected by above "Activate
# SOL Via IPMI" keyword. By default it
- # copies log from /tmp/sol_<BMC_IP>.
+ # copies log from logs/sol_<BMC_IP>.
${ipmi_cmd}= Create IPMI Ext Command String sol deactivate
Qprint Issuing ${ipmi_cmd}
diff --git a/lib/resource.robot b/lib/resource.robot
index 4b7b360..b3ad7ee 100755
--- a/lib/resource.robot
+++ b/lib/resource.robot
@@ -55,6 +55,9 @@
# IPMI timeout default.
${IPMI_TIMEOUT} ${3}
+# Log default path for IPMI SOL.
+${IPMI_SOL_LOG_FILE} ${EXECDIR}${/}logs${/}sol_${OPENBMC_HOST}
+
# PDU related parameters
${PDU_TYPE} ${EMPTY}
${PDU_IP} ${EMPTY}