From e4fd9d0463b219170d5d6507955906825fbf8fc6 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Mon, 13 Feb 2017 10:35:39 -0500 Subject: Clean up hack of run api Also fix such that the Nexus Players get kicked three times not one and a half times. BUG=skia:6045 Change-Id: Ie9142f809a979a46b17a8ad9a205279d6fcb9bd5 Reviewed-on: https://skia-review.googlesource.com/8266 Reviewed-by: Kevin Lubick Commit-Queue: Kevin Lubick --- infra/bots/recipe_modules/flavor/gn_android_flavor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'infra/bots/recipe_modules/flavor/gn_android_flavor.py') diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py index 3c77e849d7..a994f74bcc 100644 --- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py +++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py @@ -53,10 +53,9 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): import time kicks = 0 - while kicks < 2: + while True: times = 0 - while times < 30: print 'Waiting for the device to be connected and ready.' try: @@ -70,6 +69,8 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): # no device connected/authorized yet pass time.sleep(5) + if kicks >= 3: + break print 'Giving the device a "kick" by trying to reboot it.' kicks += 1 print subprocess.check_output(['adb', 'reboot']) -- cgit v1.2.3