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

Unified 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, 2 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 | scripts/slave/recipes/blink_trybot.py » ('j') | scripts/slave/recipes/blink_trybot.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..564ed4651abcaed370690a1cf593f4e8f08d564b 100644
--- a/scripts/slave/recipe_modules/chromium_tests/api.py
+++ b/scripts/slave/recipe_modules/chromium_tests/api.py
@@ -467,6 +467,35 @@ class ChromiumTestsApi(recipe_api.RecipeApi):
return True, self.m.filter.matching_exes, compile_targets
+ 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.
+ """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).
Paweł Hajdan Jr. 2014/10/29 14:11:11 This comment seems no longer accurate.
Sergiy Byelozyorov 2014/10/29 14:43:44 Done.
+ """
+ self.m.swarming.set_default_dimension('pool', 'Chrome')
+ self.m.swarming.add_default_tag('project:%s' % project_name)
+ self.m.swarming.default_idempotent = True
+
+ if precommit:
+ self.m.swarming.add_default_tag('purpose:pre-commit')
+ requester = self.m.properties.get('requester')
+ 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
+ else:
+ self.m.swarming.add_default_tag('purpose:post-commit')
+ self.m.swarming.add_default_tag('purpose:CI')
+ self.m.swarming.default_priority = 25
+
# Used to build the Google Storage archive url.
#
# We need to special-case the logic for composing the archive url for a couple
« 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