From d1f84206232c08db2af3b4ff5bfeb5243e6b892e Mon Sep 17 00:00:00 2001 From: "bulach@chromium.org" Date: Mon, 12 Aug 2013 13:12:12 +0000 Subject: 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 --- build/android/pylib/android_commands.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build') diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py index cb72fff..f8c0747 100644 --- a/build/android/pylib/android_commands.py +++ b/build/android/pylib/android_commands.py @@ -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 -- cgit v1.1