OLD | NEW |
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 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(self, mastername, buildername, use_goma=True, | 565 def run_mb(self, mastername, buildername, use_goma=True, |
566 mb_config_path=None): | 566 mb_config_path=None, swarming_targets=None): |
567 mb_config_path = (mb_config_path or | 567 mb_config_path = (mb_config_path or |
568 self.m.path['checkout'].join('tools', 'mb', | 568 self.m.path['checkout'].join('tools', 'mb', |
569 'mb_config.pyl')) | 569 'mb_config.pyl')) |
| 570 swarming_targets = swarming_targets or [] |
| 571 |
570 args=[ | 572 args=[ |
571 'gen', '-v', | 573 'gen', '-v', |
572 '-m', mastername, | 574 '-m', mastername, |
573 '-b', buildername, | 575 '-b', buildername, |
574 '--config-file', mb_config_path, | 576 '--config-file', mb_config_path, |
575 ] | 577 ] |
| 578 |
576 if use_goma: | 579 if use_goma: |
577 args += [ | 580 args += ['--goma-dir', self.m.path['build'].join('goma')] |
578 '--goma-dir', self.m.path['build'].join('goma'), | 581 |
579 ] | 582 if swarming_targets: |
580 args += [ | 583 data = '\n'.join(swarming_targets) + '\n' |
581 '//out/%s' % self.c.build_config_fs | 584 args += ['--swarming-targets-file', self.m.raw_io.input(data)] |
582 ] | 585 |
| 586 args += ['//out/%s' % self.c.build_config_fs] |
583 | 587 |
584 # This runs with no env being passed along, so we get a clean environment | 588 # This runs with no env being passed along, so we get a clean environment |
585 # without any GYP_DEFINES being present to cause confusion. | 589 # without any GYP_DEFINES being present to cause confusion. |
586 self.m.python(name='generate_build_files', | 590 self.m.python(name='generate_build_files', |
587 script=self.m.path['checkout'].join('tools', 'mb', 'mb.py'), | 591 script=self.m.path['checkout'].join('tools', 'mb', 'mb.py'), |
588 args=args) | 592 args=args) |
589 | 593 |
590 def taskkill(self): | 594 def taskkill(self): |
591 self.m.python( | 595 self.m.python( |
592 'taskkill', | 596 'taskkill', |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 args=[ | 707 args=[ |
704 '27eac9b2869ef6c89391f305a3f01285ea317867', | 708 '27eac9b2869ef6c89391f305a3f01285ea317867', |
705 '9d9a93134b3eabd003b85b4e7dea06c0eae150ed', | 709 '9d9a93134b3eabd003b85b4e7dea06c0eae150ed', |
706 ]) | 710 ]) |
707 | 711 |
708 def download_lto_plugin(self): | 712 def download_lto_plugin(self): |
709 return self.m.python( | 713 return self.m.python( |
710 name='download LTO plugin', | 714 name='download LTO plugin', |
711 script=self.m.path['checkout'].join( | 715 script=self.m.path['checkout'].join( |
712 'build', 'download_gold_plugin.py')) | 716 'build', 'download_gold_plugin.py')) |
OLD | NEW |