Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Unified Diff: scripts/slave/recipe_modules/auto_bisect/revision_state.py

Issue 2224583003: Check if device disconnects every time the last test of a revision fails (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Review fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/auto_bisect/revision_state.py
diff --git a/scripts/slave/recipe_modules/auto_bisect/revision_state.py b/scripts/slave/recipe_modules/auto_bisect/revision_state.py
index 60610442c1c0412d2d5388c18ee54584c9d62543..0fadd3bc8f7b0f201479dd83c11a060c76322d59 100644
--- a/scripts/slave/recipe_modules/auto_bisect/revision_state.py
+++ b/scripts/slave/recipe_modules/auto_bisect/revision_state.py
@@ -185,7 +185,7 @@ class RevisionState(object):
return self.bisector.api.m.gitiles.download_file(
repository_url=url, file_path=file_name, branch=branch)
except TypeError:
- print 'Could not read content for %s/%s/%s' % (url, file_name, branch)
+ print 'Could not read content for %s/%s/%s' % (url, file_name, branch)
return None
def read_deps(self, recipe_tester_name):
@@ -355,6 +355,17 @@ class RevisionState(object):
self.bisector.surface_result('MISSING_METRIC')
return
self.values += results['values']
+ api = self.bisector.api
+ if test_results.get('retcodes') and test_results['retcodes'][-1] != 0 and (
+ api.m.chromium.c.TARGET_PLATFORM == 'android'): #pragma: no cover
+ api.m.chromium_android.device_status()
+ current_connected_devices = api.m.chromium_android.devices
+ current_device = api.m.bisect_tester.device_to_test
+ if current_device not in current_connected_devices:
+ # We need to manually raise step failure here because we are catching
+ # them further down the line to enable return_code bisects and bisecting
+ # on benchmarks that are a little flaky.
+ raise api.m.step.StepFailure('Test device disconnected.')
if self.bisector.is_return_code_mode():
retcodes = test_results['retcodes']
self.overall_return_code = 0 if all(v == 0 for v in retcodes) else 1
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698