aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/flavor
diff options
context:
space:
mode:
authorGravatar Kevin Lubick <kjlubick@google.com>2017-02-15 10:08:51 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-15 15:44:44 +0000
commit65e8a713f39d2f4acf8d1e89235b83ef6d790f97 (patch)
tree3411ce4532fbce68c20b748b6e99de9164a707d9 /infra/bots/recipe_modules/flavor
parent08f14bd478c8ac88f3e503d1d8984d56e6e93c0a (diff)
Fix Nexus 10s from shutting down too often
BUG=skia: Change-Id: I373bb62c6894569a2672745ce20aa351c5893968 Reviewed-on: https://skia-review.googlesource.com/8486 Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Ravi Mistry <rmistry@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/flavor')
-rw-r--r--infra/bots/recipe_modules/flavor/gn_android_flavor.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/infra/bots/recipe_modules/flavor/gn_android_flavor.py b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
index a994f74bcc..5b71823612 100644
--- a/infra/bots/recipe_modules/flavor/gn_android_flavor.py
+++ b/infra/bots/recipe_modules/flavor/gn_android_flavor.py
@@ -155,10 +155,15 @@ class GNAndroidFlavorUtils(default_flavor.DefaultFlavorUtils):
args=[self.m.vars.skia_out.join(self.m.vars.configuration)],
infra_step=True)
- for f in self.m.run.failed_steps:
- if isinstance(f, recipe_api.InfraFailure):
- self._adb('shut down device to quarantine bot', 'shell', 'reboot', '-p')
- break
+ # Only shutdown the device and quarantine the bot if the first failed step
+ # is an infra step. If, instead, we did this for any infra failures, we
+ # would shutdown too much. For example, if a Nexus 10 died during dm
+ # and the following pull step would also fail "device not found" - causing
+ # us to run the shutdown command when the device was probably not in a
+ # broken state; it was just rebooting.
+ if (self.m.run.failed_steps and
+ isinstance(self.m.run.failed_steps[0], recipe_api.InfraFailure)):
+ self._adb('shut down device to quarantine bot', 'shell', 'reboot', '-p')
if self._ever_ran_adb:
self._adb('kill adb server', 'kill-server')