Fix HTX exerciser test suite
Changes:
- Ammend code to handle Redfish
- Update OS info logic
Change-Id: Ice921a5e38da48853f5798b2e4805d03748f33c4
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/syslib/utils_os.py b/syslib/utils_os.py
index f163201..2026d95 100755
--- a/syslib/utils_os.py
+++ b/syslib/utils_os.py
@@ -13,7 +13,7 @@
import var_funcs
-def get_os_release_info():
+def get_os_release_info(default_cmd="cat /etc/os-release"):
r"""
Get os-release info and return it as a dictionary.
@@ -58,9 +58,14 @@
[redhat_bugzilla_product_version]: 7.5
[redhat_support_product]: Red Hat Enterprise Linux
[redhat_support_product_version]: 7.5 Beta
+
+
+. Description of argument(s):
+ default_cmd A string command to be executed (e.g cat /etc/os-release).
+
"""
stdout, stderr, rc =\
- bmc_ssh_utils.os_execute_command("cat /etc/os-release")
+ bmc_ssh_utils.os_execute_command(default_cmd)
return var_funcs.key_value_outbuf_to_dict(stdout, delim="=", strip='"')
diff --git a/systest/htx_hardbootme_test.robot b/systest/htx_hardbootme_test.robot
index 18d82b4..9a65c53 100755
--- a/systest/htx_hardbootme_test.robot
+++ b/systest/htx_hardbootme_test.robot
@@ -231,8 +231,8 @@
Printn
Rprint Vars bmc_version
- ${pnor_version}= Get Host Software Objects Details
- Rprint Vars pnor_version
+ ${fw_version}= Get BMC Version
+ Rprint Vars fw_version
${is_redfish}= Run Keyword And Return Status Redfish.Login
${rest_keyword}= Set Variable If ${is_redfish} Redfish REST
@@ -242,10 +242,11 @@
Run Keyword ${rest_keyword} Power On stack_mode=skip
Run Key U Sleep \ 15s
- Delete All Error Logs
+ Run Keyword And Ignore Error Delete All Error Logs
+ Run Keyword And Ignore Error Redfish Purge Event Log
Tool Exist htxcmdline
- ${os_release_info}= utils_os.Get OS Release Info
+ ${os_release_info}= utils_os.Get OS Release Info uname
Rprint Vars os_release_info fmt=1
# Shutdown if HTX is running.