Fixed "Is HTX Running Keyword"
- Accounted for selected_mdt state
Change-Id: I82e1298ed023709d884fe9cf429e1475f2a15d0f
Signed-off-by: Joy Onyerikwu <onyekachukwu.joy.onyerikwu@ibm.com>
diff --git a/syslib/utils_os.robot b/syslib/utils_os.robot
index 4e1f0a1..476dc96 100755
--- a/syslib/utils_os.robot
+++ b/syslib/utils_os.robot
@@ -99,16 +99,13 @@
# ${status}= Is HTX Running
# Run Keyword If '${status}' == 'True' Shutdown HTX Exerciser
-
${status} ${stderr} ${rc}= OS Execute Command
- ... htxcmdline -status ignore_err=1
+ ... htxcmdline -getstats ignore_err=1
+ # Get HTX state
+ # (idle, currently running, selected_mdt but not running).
+ ${running}= Set Variable If
+ ... "Currently running" in """${status}""" ${True} ${False}
- ${match_count_idle}= Count Values In List ${status}
- ... Daemon state is <IDLE>
- ${match_count_not_running}= Count Values In List ${status}
- ... No MDT is currently running
- ${running}= Evaluate
- ... not (${match_count_idle} or ${match_count_not_running})
[Return] ${running}