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

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/api.py

Issue 2112553005: Revert of Redo test after step failure if multiple android devices are connected to lin… (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/local_bisect.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """API for the bisect recipe module. 5 """API for the bisect recipe module.
6 6
7 This API is meant to enable the bisect recipe to bisect any chromium-supported 7 This API is meant to enable the bisect recipe to bisect any chromium-supported
8 platform for any test that can be run via buildbot, perf or otherwise. 8 platform for any test that can be run via buildbot, perf or otherwise.
9 """ 9 """
10 10
(...skipping 22 matching lines...) Expand all
33 # Email to send on try jobs (for build requests) since git try will not 33 # Email to send on try jobs (for build requests) since git try will not
34 # necessarily rely on a local checkout for that information. 34 # necessarily rely on a local checkout for that information.
35 BOT_EMAIL = 'chrome_bot@chromium.org' 35 BOT_EMAIL = 'chrome_bot@chromium.org'
36 SERVICE_ACCOUNT = 'chromium_bisect' 36 SERVICE_ACCOUNT = 'chromium_bisect'
37 37
38 def __init__(self, *args, **kwargs): 38 def __init__(self, *args, **kwargs):
39 super(AutoBisectApi, self).__init__(*args, **kwargs) 39 super(AutoBisectApi, self).__init__(*args, **kwargs)
40 self.override_poll_interval = None 40 self.override_poll_interval = None
41 self.bot_db = None 41 self.bot_db = None
42 # Repo for triggering build jobs. 42 # Repo for triggering build jobs.
43 self.svn_repo_url = 'svn://svn.chromium.org/chrome-try/try-perf' 43 self.svn_repo_url = 'svn://svn.chromium.org/chrome-try/try-perf'
44 # The variable below are set and used for the internal bisects. 44 # The variable below are set and used for the internal bisects.
45 self.buildurl_gs_prefix = None 45 self.buildurl_gs_prefix = None
46 self.internal_bisect = False 46 self.internal_bisect = False
47 self.builder_bot = None 47 self.builder_bot = None
48 self.full_deploy_script = None 48 self.full_deploy_script = None
49 49
50
51 def perform_bisect(self, **flags): 50 def perform_bisect(self, **flags):
52 return local_bisect.perform_bisect(self, **flags) 51 return local_bisect.perform_bisect(self, **flags)
53 52
54 def create_bisector(self, bisect_config_dict, dummy_mode=False, **flags): 53 def create_bisector(self, bisect_config_dict, dummy_mode=False, **flags):
55 """Passes the api and the config dictionary to the Bisector constructor. 54 """Passes the api and the config dictionary to the Bisector constructor.
56 55
57 For details about the keys in the bisect config dictionary go to: 56 For details about the keys in the bisect config dictionary go to:
58 http://chromium.org/developers/speed-infra/perf-try-bots-bisect-bots/config 57 http://chromium.org/developers/speed-infra/perf-try-bots-bisect-bots/config
59 58
60 Args: 59 Args:
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 'author': commit_info['author']['name'], 148 'author': commit_info['author']['name'],
150 'email': commit_info['author']['email'], 149 'email': commit_info['author']['email'],
151 'subject': subject, 150 'subject': subject,
152 'body': body, 151 'body': body,
153 'date': commit_info['committer']['time'], 152 'date': commit_info['committer']['time'],
154 } 153 }
155 return None 154 return None
156 except self.m.step.StepFailure: # pragma: no cover 155 except self.m.step.StepFailure: # pragma: no cover
157 self.surface_result('BAD_REV') 156 self.surface_result('BAD_REV')
158 raise 157 raise
159 158
160 159
161 def run_bisect_script(self, **kwargs): 160 def run_bisect_script(self, **kwargs):
162 """Executes src/tools/run-perf-bisect-regression.py to perform bisection.""" 161 """Executes src/tools/run-perf-bisect-regression.py to perform bisection."""
163 self.m.python( 162 self.m.python(
164 'Preparing for Bisection', 163 'Preparing for Bisection',
165 script=self.m.path['checkout'].join( 164 script=self.m.path['checkout'].join(
166 'tools', 'prepare-bisect-perf-regression.py'), 165 'tools', 'prepare-bisect-perf-regression.py'),
167 args=['-w', self.m.path['slave_build']]) 166 args=['-w', self.m.path['slave_build']])
168 args = [] 167 args = []
169 168
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 else: 316 else:
318 for apk in deploy_apks: 317 for apk in deploy_apks:
319 self.m.chromium_android.adb_install_apk(apk) 318 self.m.chromium_android.adb_install_apk(apk)
320 319
321 def full_deploy_on_device(self, deploy_script, args=None): # pragma: no cover 320 def full_deploy_on_device(self, deploy_script, args=None): # pragma: no cover
322 """Install android-chrome apk on device.""" 321 """Install android-chrome apk on device."""
323 full_deploy_flags = [ 322 full_deploy_flags = [
324 '-v', 323 '-v',
325 '--blacklist-file', self.m.chromium_android.blacklist_file, 324 '--blacklist-file', self.m.chromium_android.blacklist_file,
326 '--perfbot', 325 '--perfbot',
327 '--release', 326 '--release',
328 ] 327 ]
329 if args: 328 if args:
330 full_deploy_flags += args 329 full_deploy_flags += args
331 self.m.python( 330 self.m.python(
332 'Deploy on Device', 331 'Deploy on Device',
333 deploy_script, 332 deploy_script,
334 full_deploy_flags, 333 full_deploy_flags,
335 infra_step=True, 334 infra_step=True,
336 env=self.m.chromium.get_env()) 335 env=self.m.chromium.get_env())
337 336
338 def start_try_job(self, api, update_step=None, bot_db=None, **kwargs): 337 def start_try_job(self, api, update_step=None, bot_db=None, **kwargs):
339 """Starts a recipe bisect job, perf test run, or legacy bisect run. 338 """Starts a recipe bisect job, perf test run, or legacy bisect run.
340 339
341 This function is an entry point for: 340 This function is an entry point for:
342 1. A legacy bisect job run (in this case, there will be a patch 341 1. A legacy bisect job run (in this case, there will be a patch
343 with a bisect config file). 342 with a bisect config file).
344 2. A recipe bisect job run (in this case, there will be a property 343 2. A recipe bisect job run (in this case, there will be a property
345 called bisect_config which contains the config parameters). 344 called bisect_config which contains the config parameters).
346 3. A single test run for a recipe bisect job (there will be a 345 3. A single test run for a recipe bisect job (there will be a
347 bisect_config property but it won't contain good/bad revisions). 346 bisect_config property but it won't contain good/bad revisions).
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 affected_files, update_step, self.bot_db) 385 affected_files, update_step, self.bot_db)
387 finally: 386 finally:
388 if api.chromium.c.TARGET_PLATFORM == 'android': 387 if api.chromium.c.TARGET_PLATFORM == 'android':
389 if self.internal_bisect: # pragma: no cover 388 if self.internal_bisect: # pragma: no cover
390 api.chromium_android.init_and_sync( 389 api.chromium_android.init_and_sync(
391 gclient_config=api.chromium_android.c.internal_dir_name, 390 gclient_config=api.chromium_android.c.internal_dir_name,
392 use_bot_update=True) 391 use_bot_update=True)
393 else: 392 else:
394 api.bot_update.ensure_checkout() 393 api.bot_update.ensure_checkout()
395 api.chromium_android.common_tests_final_steps() 394 api.chromium_android.common_tests_final_steps()
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/local_bisect.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698