'Stop SOL Console Logging' failing to find active SOL pid.
Change-Id: I89fd3d438369c02d16dc04da6fd4e4bd69a3c7a5
Signed-off-by: Michael Walsh <micwalsh@us.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index e09a445..4d14919 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -2,6 +2,7 @@
Resource ../lib/resource.txt
Resource ../lib/rest_client.robot
Resource ../lib/connection_client.robot
+Library String
Library DateTime
Library Process
Library OperatingSystem
@@ -535,6 +536,10 @@
${log_file_path}= Create OS Console File Path ${log_file_path}
# Find the pid of the active system console logging session (if any).
${search_string}= Create OS Console Command String
+ # At least in some cases, ps output does not show double quotes so we must
+ # replace them in our search string with the regexes to indicate that they
+ # are optional.
+ ${search_string}= Replace String ${search_string} " ["]?
${cmd_buf}= Catenate echo $(ps -ef | egrep '${search_string}'
... | egrep -v grep | cut -c10-14)
Rdpissuing ${cmd_buf}