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

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
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, precommit=True):
M-A Ruel 2014/10/29 14:14:27 I'd prefer no default value.
Sergiy Byelozyorov 2014/10/29 14:43:44 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).
Paweł Hajdan Jr. 2014/10/29 14:11:11 This comment seems no longer accurate.
Sergiy Byelozyorov 2014/10/29 14:43:44 Done.
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.default_idempotent = True
480
481 if precommit:
482 self.m.swarming.add_default_tag('purpose:pre-commit')
483 requester = self.m.properties.get('requester')
484 if requester == 'commit-bot@chromium.org':
485 self.m.swarming.default_priority = 30
486 self.m.swarming.add_default_tag('purpose:CQ')
487 blamelist = self.m.properties.get('blamelist')
488 if len(blamelist) == 1:
489 requester = blamelist[0]
490 else:
491 self.m.swarming.default_priority = 50
492 self.m.swarming.add_default_tag('purpose:ManualTS')
493 self.m.swarming.default_user = requester
494 else:
495 self.m.swarming.add_default_tag('purpose:post-commit')
496 self.m.swarming.add_default_tag('purpose:CI')
497 self.m.swarming.default_priority = 25
498
470 # Used to build the Google Storage archive url. 499 # Used to build the Google Storage archive url.
471 # 500 #
472 # We need to special-case the logic for composing the archive url for a couple 501 # 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. 502 # of masters. That has been moved outside of the compile method.
474 # 503 #
475 # Special-cased masters: 504 # Special-cased masters:
476 # 'chromium.perf': 505 # 'chromium.perf':
477 # exclude the name of the master from the url. 506 # exclude the name of the master from the url.
478 # 'tryserver.chromium.perf': 507 # 'tryserver.chromium.perf':
479 # return nothing so that the archive url specified in factory_properties 508 # return nothing so that the archive url specified in factory_properties
480 # (as set on the master's configuration) is used instead. 509 # (as set on the master's configuration) is used instead.
481 def _build_gs_archive_url(self, mastername, master_config): 510 def _build_gs_archive_url(self, mastername, master_config):
482 if mastername == 'chromium.perf': 511 if mastername == 'chromium.perf':
483 return self.m.archive.legacy_upload_url( 512 return self.m.archive.legacy_upload_url(
484 master_config.get('build_gs_bucket'), 513 master_config.get('build_gs_bucket'),
485 extra_url_components=None) 514 extra_url_components=None)
486 elif mastername == 'tryserver.chromium.perf': 515 elif mastername == 'tryserver.chromium.perf':
487 return None 516 return None
488 else: 517 else:
489 return self.m.archive.legacy_upload_url( 518 return self.m.archive.legacy_upload_url(
490 master_config.get('build_gs_bucket'), 519 master_config.get('build_gs_bucket'),
491 extra_url_components=self.m.properties['mastername']) 520 extra_url_components=self.m.properties['mastername'])
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/blink_trybot.py » ('j') | scripts/slave/recipes/blink_trybot.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698