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

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

Issue 688473003: Added swarming step to the Blink trybots (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Addressed comments Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | scripts/slave/recipes/blink_trybot.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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import copy 5 import copy
6 6
7 from slave import recipe_api 7 from slave import recipe_api
8 8
9 9
10 # Different types of builds this recipe module can do. 10 # Different types of builds this recipe module can do.
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 # but adding |matching_exes| makes determing if conditional tests are 460 # but adding |matching_exes| makes determing if conditional tests are
461 # necessary easier. For example, if we didn't do this we could end up 461 # necessary easier. For example, if we didn't do this we could end up
462 # with chrome_run as a compile_target and not chrome (since chrome_run 462 # with chrome_run as a compile_target and not chrome (since chrome_run
463 # depends upon chrome). This results in not picking up 463 # depends upon chrome). This results in not picking up
464 # NaclIntegrationTest as it depends upon chrome not chrome_run. 464 # NaclIntegrationTest as it depends upon chrome not chrome_run.
465 compile_targets = list(set(self.m.filter.matching_exes + 465 compile_targets = list(set(self.m.filter.matching_exes +
466 self.m.filter.compile_targets)) 466 self.m.filter.compile_targets))
467 467
468 return True, self.m.filter.matching_exes, compile_targets 468 return True, self.m.filter.matching_exes, compile_targets
469 469
470 def configure_swarming(self, project_name):
M-A Ruel 2014/10/29 13:04:50 Add precommit as a parameter. It'd be a bool valu
Sergiy Byelozyorov 2014/10/29 13:20:42 Done.
471 """Configures default swarming dimensions and tags.
472
473 Args:
474 project_name: Lowercase name of the project, e.g. "blink", "chromium".
475 build_properties: Build properties object (api.properties in the recipe).
476 """
477 self.m.swarming.set_default_dimension('pool', 'Chrome')
478 self.m.swarming.add_default_tag('project:%s' % project_name)
479 self.m.swarming.add_default_tag('purpose:pre-commit')
M-A Ruel 2014/10/29 13:04:50 self.m.swarming.add_default_tag('purpose:pre-commi
Sergiy Byelozyorov 2014/10/29 13:20:42 Done.
480 self.m.swarming.default_idempotent = True
481
482 requester = self.m.properties.get('requester')
M-A Ruel 2014/10/29 13:04:50 if precommit: <lines 482-492> else: self.m.swa
Sergiy Byelozyorov 2014/10/29 13:20:42 Done. Also added self.m.swarming.add_default_tag(
483 if requester == 'commit-bot@chromium.org':
484 self.m.swarming.default_priority = 30
485 self.m.swarming.add_default_tag('purpose:CQ')
486 blamelist = self.m.properties.get('blamelist')
487 if len(blamelist) == 1:
488 requester = blamelist[0]
489 else:
490 self.m.swarming.default_priority = 50
491 self.m.swarming.add_default_tag('purpose:ManualTS')
492 self.m.swarming.default_user = requester
493
470 # Used to build the Google Storage archive url. 494 # Used to build the Google Storage archive url.
471 # 495 #
472 # We need to special-case the logic for composing the archive url for a couple 496 # We need to special-case the logic for composing the archive url for a couple
473 # of masters. That has been moved outside of the compile method. 497 # of masters. That has been moved outside of the compile method.
474 # 498 #
475 # Special-cased masters: 499 # Special-cased masters:
476 # 'chromium.perf': 500 # 'chromium.perf':
477 # exclude the name of the master from the url. 501 # exclude the name of the master from the url.
478 # 'tryserver.chromium.perf': 502 # 'tryserver.chromium.perf':
479 # return nothing so that the archive url specified in factory_properties 503 # return nothing so that the archive url specified in factory_properties
480 # (as set on the master's configuration) is used instead. 504 # (as set on the master's configuration) is used instead.
481 def _build_gs_archive_url(self, mastername, master_config): 505 def _build_gs_archive_url(self, mastername, master_config):
482 if mastername == 'chromium.perf': 506 if mastername == 'chromium.perf':
483 return self.m.archive.legacy_upload_url( 507 return self.m.archive.legacy_upload_url(
484 master_config.get('build_gs_bucket'), 508 master_config.get('build_gs_bucket'),
485 extra_url_components=None) 509 extra_url_components=None)
486 elif mastername == 'tryserver.chromium.perf': 510 elif mastername == 'tryserver.chromium.perf':
487 return None 511 return None
488 else: 512 else:
489 return self.m.archive.legacy_upload_url( 513 return self.m.archive.legacy_upload_url(
490 master_config.get('build_gs_bucket'), 514 master_config.get('build_gs_bucket'),
491 extra_url_components=self.m.properties['mastername']) 515 extra_url_components=self.m.properties['mastername'])
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/blink_trybot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698