Chromium Code Reviews| 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.""" |