Chromium Code Reviews| Index: scripts/slave/recipe_modules/chromium_tests/api.py |
| diff --git a/scripts/slave/recipe_modules/chromium_tests/api.py b/scripts/slave/recipe_modules/chromium_tests/api.py |
| index c13a16628623d5e47468a90d4d6c19576550c9a5..27f47d571d03978e8c94ded234edffb1d3762750 100644 |
| --- a/scripts/slave/recipe_modules/chromium_tests/api.py |
| +++ b/scripts/slave/recipe_modules/chromium_tests/api.py |
| @@ -467,6 +467,30 @@ class ChromiumTestsApi(recipe_api.RecipeApi): |
| return True, self.m.filter.matching_exes, compile_targets |
| + 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.
|
| + """Configures default swarming dimensions and tags. |
| + |
| + Args: |
| + project_name: Lowercase name of the project, e.g. "blink", "chromium". |
| + build_properties: Build properties object (api.properties in the recipe). |
| + """ |
| + self.m.swarming.set_default_dimension('pool', 'Chrome') |
| + self.m.swarming.add_default_tag('project:%s' % project_name) |
| + 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.
|
| + self.m.swarming.default_idempotent = True |
| + |
| + 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(
|
| + if requester == 'commit-bot@chromium.org': |
| + self.m.swarming.default_priority = 30 |
| + self.m.swarming.add_default_tag('purpose:CQ') |
| + blamelist = self.m.properties.get('blamelist') |
| + if len(blamelist) == 1: |
| + requester = blamelist[0] |
| + else: |
| + self.m.swarming.default_priority = 50 |
| + self.m.swarming.add_default_tag('purpose:ManualTS') |
| + self.m.swarming.default_user = requester |
| + |
| # Used to build the Google Storage archive url. |
| # |
| # We need to special-case the logic for composing the archive url for a couple |