Commit d1f84206 authored by bulach@chromium.org's avatar bulach@chromium.org

Android: wait for reboot.

On some devices, "reboot" is not synchronous, so the Reboot()
call and its internal waits were finishing before the device had even
started rebooting.

BUG=265425

Review URL: https://chromiumcodereview.appspot.com/22587004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216979 0039d316-1c4b-4281-b951-d872f2087c98
parent de5b194a
...@@ -350,6 +350,11 @@ class AndroidCommands(object): ...@@ -350,6 +350,11 @@ class AndroidCommands(object):
if full_reboot or not self.IsRootEnabled(): if full_reboot or not self.IsRootEnabled():
self._adb.SendCommand('reboot') self._adb.SendCommand('reboot')
timeout = 300 timeout = 300
retries = 1
# Wait for the device to disappear.
while retries < 10 and self.IsOnline():
time.sleep(1)
retries += 1
else: else:
self.RestartShell() self.RestartShell()
timeout = 120 timeout = 120
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment