Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index 65aab3c3333d6d3e43d1e793f5d15c9dec0f708e..aea334532f94fadf8dac754e21cccfa176518ad8 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -466,6 +466,17 @@ class AndroidCommands(object): |
logging.info('\n>>> '.join(result)) |
return result |
+ def GetShellCommandStatusAndOutput(self, command, timeout_time=20, |
+ log_result=False): |
+ """See RunShellCommand() above. |
+ |
+ Returns: |
+ The tuple (exit code, list of output lines). |
+ """ |
+ lines = self.RunShellCommand( |
+ command + '; echo $?', timeout_time, log_result) |
digit1
2012/11/19 15:27:43
Nit: This assumes that the command's output will b
Philippe
2012/11/19 17:18:59
Good point.
|
+ return (int(lines[-1]), lines[:-1]) |
+ |
def KillAll(self, process): |
"""Android version of killall, connected via adb. |