SOL utility process running check

Robot 'Start Command' keyword starts execution of the command
on the remote machine and returns immediately. This keyword
returns nothing and does not wait for the command execution
to be finished.

So if SOL starting failed we are not catching this error.
This had to be mitigated when stopping the SOL to verify if
the process is running or not. if not it will log and return
'No obmc-console-client process running' string back to the
caller.

This fix is to avoid other user of this utility not to fail
just because it failed to start, but allows the user to have
it own failing mechanism based out of the return output.

Resolves openbmc/openbmc-test-automation#152

Change-Id: I5c602fc5cf4257e0fe17ad347c264e75ccd6282d
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 713000f..4f0acca 100644
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -269,15 +269,21 @@
     ...  Execute Command
     ...  ls ${file_path}-${LOG_TIME}_* | cut -d'_' -f 2
     ...  return_stderr=True
-    Return From Keyword If   '${pid}' == '${EMPTY}'
-    ...   No obmc-console-client process running
     Should Be Empty     ${stderr}
 
+    ${rc}=
+    ...  Execute Command
+    ...  ps ax | grep ${pid} | grep -v grep
+    ...  return_stdout=False  return_rc=True
+
+    Return From Keyword If   '${rc}' == '${1}'
+    ...   No obmc-console-client process running
+
     ${console}  ${stderr}=
     ...  Execute Command   kill -s KILL ${pid}
     ...  return_stderr=True
     Should Be Empty     ${stderr}
-    Log    Current Client PID:${pid}
+    Log  Current Client PID:${pid}
 
     ${console}  ${stderr}=
     ...  Execute Command