Index: 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 85ab3732d54d7901c46f1208a14b0dcefd148355..7a2864b47cbbebfa0078c1e46bb3ab01e4ed067e 100644 |
--- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py |
+++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py |
@@ -63,6 +63,19 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils): |
def install(self): |
self._adb('reboot', 'reboot') |
borenet
2016/09/13 17:23:25
I recommend sleeping for at least 10s after issuin
|
self._adb('wait for device', 'wait-for-usb-device') |
+ self.m.python.inline('wait for sys.boot_completed', """ |
+ import subprocess |
+ import sys |
+ import time |
borenet
2016/09/13 17:23:25
I recommend folding the "adb reboot", "sleep 10",
|
+ time.sleep(30) |
+ for attempt in range(30): |
+ done = subprocess.check_output(['adb', 'shell', |
+ 'getprop', 'sys.boot_completed']) |
borenet
2016/09/13 17:23:25
Might want to try/catch this in case weird things
|
+ if done.strip() == '1': |
+ sys.exit(0) |
+ time.sleep(1) |
+ sys.exit(1) |
+ """, infra_step=True) |
self._adb('TEMPORARY clear /data/local/tmp', |
'shell', 'rm', '-rf', '/data/local/tmp/*') |
self._adb('mkdir /data/local/tmp/resources', |