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: http://src.chromium.org/svn/trunk/src/build@216979 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
b452774040
Коммит
b17bbe9aab
|
@ -350,6 +350,11 @@ class AndroidCommands(object):
|
|||
if full_reboot or not self.IsRootEnabled():
|
||||
self._adb.SendCommand('reboot')
|
||||
timeout = 300
|
||||
retries = 1
|
||||
# Wait for the device to disappear.
|
||||
while retries < 10 and self.IsOnline():
|
||||
time.sleep(1)
|
||||
retries += 1
|
||||
else:
|
||||
self.RestartShell()
|
||||
timeout = 120
|
||||
|
|
Загрузка…
Ссылка в новой задаче