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

Side by Side 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: merge patchset #3 to r295696 (no other changes) 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium_tests/api.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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 re 5 import re
6 6
7 from recipe_engine import recipe_api 7 from recipe_engine import recipe_api
8 from recipe_engine import util as recipe_util 8 from recipe_engine import util as recipe_util
9 9
10 class TestLauncherFilterFileInputPlaceholder(recipe_util.Placeholder): 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.Placeholder):
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 self.m.python( 555 self.m.python(
556 name='gn', 556 name='gn',
557 script=self.m.path['depot_tools'].join('gn.py'), 557 script=self.m.path['depot_tools'].join('gn.py'),
558 args=[ 558 args=[
559 '--root=%s' % str(self.m.path['checkout']), 559 '--root=%s' % str(self.m.path['checkout']),
560 'gen', 560 'gen',
561 build_dir, 561 build_dir,
562 '--args=%s' % ' '.join(gn_args), 562 '--args=%s' % ' '.join(gn_args),
563 ]) 563 ])
564 564
565 def run_mb_if_necessary(self, mastername, buildername, tests):
566 if self.c.project_generator.tool == 'mb':
567 self.run_mb(mastername, buildername,
568 swarming_targets=[t.name for t in tests if t.uses_swarming])
569
565 def run_mb(self, mastername, buildername, use_goma=True, 570 def run_mb(self, mastername, buildername, use_goma=True,
566 mb_config_path=None): 571 mb_config_path=None, swarming_targets=None):
567 mb_config_path = (mb_config_path or 572 mb_config_path = (mb_config_path or
568 self.m.path['checkout'].join('tools', 'mb', 573 self.m.path['checkout'].join('tools', 'mb',
569 'mb_config.pyl')) 574 'mb_config.pyl'))
575 swarming_targets = swarming_targets or []
576
570 args=[ 577 args=[
571 'gen', '-v', 578 'gen', '-v',
572 '-m', mastername, 579 '-m', mastername,
573 '-b', buildername, 580 '-b', buildername,
574 '--config-file', mb_config_path, 581 '--config-file', mb_config_path,
575 ] 582 ]
583
576 if use_goma: 584 if use_goma:
577 args += [ 585 args += ['--goma-dir', self.m.path['build'].join('goma')]
578 '--goma-dir', self.m.path['build'].join('goma'), 586
579 ] 587 if swarming_targets:
580 args += [ 588 data = '\n'.join(swarming_targets) + '\n'
581 '//out/%s' % self.c.build_config_fs 589 args += ['--swarming-targets-file', self.m.raw_io.input(data)]
582 ] 590
591 args += ['//out/%s' % self.c.build_config_fs]
583 592
584 # This runs with no env being passed along, so we get a clean environment 593 # This runs with no env being passed along, so we get a clean environment
585 # without any GYP_DEFINES being present to cause confusion. 594 # without any GYP_DEFINES being present to cause confusion.
586 self.m.python(name='generate_build_files', 595 self.m.python(name='generate_build_files',
587 script=self.m.path['checkout'].join('tools', 'mb', 'mb.py'), 596 script=self.m.path['checkout'].join('tools', 'mb', 'mb.py'),
588 args=args) 597 args=args)
589 598
590 def taskkill(self): 599 def taskkill(self):
591 self.m.python( 600 self.m.python(
592 'taskkill', 601 'taskkill',
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 args=[ 712 args=[
704 '27eac9b2869ef6c89391f305a3f01285ea317867', 713 '27eac9b2869ef6c89391f305a3f01285ea317867',
705 '9d9a93134b3eabd003b85b4e7dea06c0eae150ed', 714 '9d9a93134b3eabd003b85b4e7dea06c0eae150ed',
706 ]) 715 ])
707 716
708 def download_lto_plugin(self): 717 def download_lto_plugin(self):
709 return self.m.python( 718 return self.m.python(
710 name='download LTO plugin', 719 name='download LTO plugin',
711 script=self.m.path['checkout'].join( 720 script=self.m.path['checkout'].join(
712 'build', 'download_gold_plugin.py')) 721 'build', 'download_gold_plugin.py'))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium_tests/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698