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

Unified Diff: build/android/emulator.py

Issue 8831002: Android buildbot: be more tolerant of 'stuck' devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/emulator.py
diff --git a/build/android/emulator.py b/build/android/emulator.py
index b5e4436cd12097cebbc300e39d5a745e565259b5..dcc4fb6c62bc9e89a4f5d66f74a4a7b4006a96d1 100755
--- a/build/android/emulator.py
+++ b/build/android/emulator.py
@@ -81,13 +81,17 @@ class Emulator(object):
# Signals we listen for to kill the emulator on
_SIGNALS = (signal.SIGINT, signal.SIGHUP)
- # Time to wait for an emulator launch, in seconds.
+ # Time to wait for an emulator launch, in seconds. This includes
+ # the time to launch the emulator and a wait-for-device command.
_EMULATOR_LAUNCH_TIMEOUT = 120
# Timeout interval of wait-for-device command before bouncing to a a
# process life check.
_EMULATOR_WFD_TIMEOUT = 5
+ # Time to wait for a "wait for boot complete" (property set on device).
+ _EMULATOR_WFBC_TIMEOUT = 120
bulach 2011/12/07 06:27:09 nit: this class is called "Emulator", so you could
+
def __init__(self):
try:
android_sdk_root = os.environ['ANDROID_SDK_ROOT']
@@ -156,7 +160,8 @@ class Emulator(object):
logging.info('Seconds waited on wait-for-device: %d', seconds_waited)
# Now that we checked for obvious problems, wait for a boot complete.
# Waiting for the package manager has been problematic.
- a.Adb().WaitForBootComplete()
+ a.Adb().SetTargetSerial(self.device)
+ a.Adb().WaitForBootComplete(self._EMULATOR_WFBC_TIMEOUT)
def Shutdown(self):
"""Shuts down the process started by launch."""
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698