Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3762)

Unified Diff: build/android/pylib/android_commands.py

Issue 10781032: restarting adb server before each testing start will cause conflict for multiple emulators (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 5e731173dccb9a2189aef1d7ea9db27363bf87de..8a3ea6b316f7dc48997f666a9b825f7465817d33 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -204,6 +204,21 @@ def GetLogTimestamp(log_line, year):
logging.critical('Error reading timestamp from ' + log_line)
return None
bulach 2012/07/17 10:26:08 nit: the styleguide requires two \n between top-le
+def RestartAdbServer():
+ """Restart the adb server."""
+ KillAdbServer()
+ StartAdbServer()
+
+def KillAdbServer():
+ """Kill adb server."""
+ adb_cmd = ['adb', 'kill-server']
+ return cmd_helper.RunCmd(adb_cmd)
+
+def StartAdbServer():
+ """Start adb server."""
+ adb_cmd = ['adb', 'start-server']
+ return cmd_helper.RunCmd(adb_cmd)
+
class AndroidCommands(object):
"""Helper class for communicating with Android device via adb.
@@ -319,21 +334,6 @@ class AndroidCommands(object):
if out.strip() != 'remount succeeded':
raise errors.MsgException('Remount failed: %s' % out)
- def RestartAdbServer(self):
- """Restart the adb server."""
- self.KillAdbServer()
- self.StartAdbServer()
-
- def KillAdbServer(self):
- """Kill adb server."""
- adb_cmd = ['adb', 'kill-server']
- return cmd_helper.RunCmd(adb_cmd)
-
- def StartAdbServer(self):
- """Start adb server."""
- adb_cmd = ['adb', 'start-server']
- return cmd_helper.RunCmd(adb_cmd)
-
def WaitForSystemBootCompleted(self, wait_time):
"""Waits for targeted system's boot_completed flag to be set.

Powered by Google App Engine
This is Rietveld 408576698