projects
/
test
/
tools
/
testkit-lite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b75c9df
)
process endless stdout of daemon launching
author
chengtao.liu
<chengtaox.liu@intel.com>
Mon, 24 Mar 2014 07:43:42 +0000
(15:43 +0800)
committer
chengtao.liu
<chengtaox.liu@intel.com>
Mon, 24 Mar 2014 07:43:42 +0000
(15:43 +0800)
commodule/autoexec.py
patch
|
blob
|
history
diff --git
a/commodule/autoexec.py
b/commodule/autoexec.py
index
b5a2878
..
7542720
100644
(file)
--- a/
commodule/autoexec.py
+++ b/
commodule/autoexec.py
@@
-45,9
+45,12
@@
def shell_command(cmd, timeout=15):
killall(proc.pid)
exit_code = -1
result = []
- else:
- if not cmd.endswith('&'):
- result = proc.stdout.readlines() or proc.stderr.readlines()
+ elif not cmd.endswith('&'):
+ while True:
+ line = proc.stdout.readline()
+ if not line or line.find('daemon started') >= 0:
+ break
+ result.append(line)
return [exit_code, result]