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

Unified Diff: scripts/slave/recipe_modules/chromium/api.py

Issue 1177593002: Add swarming support for MB (and the GN bots) in the chromium recipes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: refactor run_mb calls Created 5 years, 6 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/recipe_modules/chromium/chromium_win.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/chromium/api.py
diff --git a/scripts/slave/recipe_modules/chromium/api.py b/scripts/slave/recipe_modules/chromium/api.py
index caea92bccf1bb4e179b7b1eadb39eec46316421d..5a0eb0a45a73b0144baa4471ed1eae2d8579ea7c 100644
--- a/scripts/slave/recipe_modules/chromium/api.py
+++ b/scripts/slave/recipe_modules/chromium/api.py
@@ -579,24 +579,33 @@ class ChromiumApi(recipe_api.RecipeApi):
'--args=%s' % ' '.join(gn_args),
])
+ def run_mb_if_necessary(self, mastername, buildername, tests):
Paweł Hajdan Jr. 2015/06/11 10:11:24 Why is it still a separate method and not part of
Dirk Pranke 2015/06/11 16:57:52 This call should run before we call analyze(), whi
Paweł Hajdan Jr. 2015/06/12 09:18:44 Why does it need to run before analyze? I'm also
Dirk Pranke 2015/06/12 16:00:01 My main concern is that if there's something wrong
Paweł Hajdan Jr. 2015/06/15 10:15:48 I think the scenario is real, but wouldn't "analyz
Dirk Pranke 2015/06/15 17:02:10 In GN, you'll probably get the same error, since a
Paweł Hajdan Jr. 2015/06/15 17:10:00 Makes sense, agreed.
+ if self.c.project_generator.tool == 'mb':
+ self.run_mb(mastername, buildername,
+ swarming_targets=[t.name for t in tests if t.uses_swarming])
+
def run_mb(self, mastername, buildername, use_goma=True,
- mb_config_path=None):
+ mb_config_path=None, swarming_targets=None):
mb_config_path = (mb_config_path or
self.m.path['checkout'].join('tools', 'mb',
'mb_config.pyl'))
+ swarming_targets = swarming_targets or []
+
args=[
'gen', '-v',
'-m', mastername,
'-b', buildername,
'--config-file', mb_config_path,
]
+
if use_goma:
- args += [
- '--goma-dir', self.m.path['build'].join('goma'),
- ]
- args += [
- '//out/%s' % self.c.build_config_fs
- ]
+ args += ['--goma-dir', self.m.path['build'].join('goma')]
+
+ if swarming_targets:
+ data = '\n'.join(swarming_targets) + '\n'
+ args += ['--swarming-targets-file', self.m.raw_io.input(data)]
+
+ args += ['//out/%s' % self.c.build_config_fs]
# This runs with no env being passed along, so we get a clean environment
# without any GYP_DEFINES being present to cause confusion.
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium/chromium_win.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698