| 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 from . import builders | 10 from . import builders |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 name='gn', | 573 name='gn', |
| 574 script=self.m.path['depot_tools'].join('gn.py'), | 574 script=self.m.path['depot_tools'].join('gn.py'), |
| 575 args=[ | 575 args=[ |
| 576 '--root=%s' % str(self.m.path['checkout']), | 576 '--root=%s' % str(self.m.path['checkout']), |
| 577 'gen', | 577 'gen', |
| 578 build_dir, | 578 build_dir, |
| 579 '--args=%s' % ' '.join(gn_args), | 579 '--args=%s' % ' '.join(gn_args), |
| 580 ]) | 580 ]) |
| 581 | 581 |
| 582 def run_mb(self, mastername, buildername, use_goma=True, | 582 def run_mb(self, mastername, buildername, use_goma=True, |
| 583 mb_config_path=None): | 583 mb_config_path=None, swarming_targets=None): |
| 584 mb_config_path = (mb_config_path or | 584 mb_config_path = (mb_config_path or |
| 585 self.m.path['checkout'].join('tools', 'mb', | 585 self.m.path['checkout'].join('tools', 'mb', |
| 586 'mb_config.pyl')) | 586 'mb_config.pyl')) |
| 587 swarming_targets = swarming_targets or [] |
| 588 |
| 587 args=[ | 589 args=[ |
| 588 'gen', '-v', | 590 'gen', '-v', |
| 589 '-m', mastername, | 591 '-m', mastername, |
| 590 '-b', buildername, | 592 '-b', buildername, |
| 591 '--config-file', mb_config_path, | 593 '--config-file', mb_config_path, |
| 592 ] | 594 ] |
| 595 |
| 593 if use_goma: | 596 if use_goma: |
| 594 args += [ | 597 args += ['--goma-dir', self.m.path['build'].join('goma')] |
| 595 '--goma-dir', self.m.path['build'].join('goma'), | 598 |
| 596 ] | 599 if swarming_targets: |
| 597 args += [ | 600 data = '\n'.join(swarming_targets) + '\n' |
| 598 '//out/%s' % self.c.build_config_fs | 601 args += ['--swarming-targets-file', self.m.raw_io.input(data)] |
| 599 ] | 602 |
| 603 args += ['//out/%s' % self.c.build_config_fs] |
| 600 | 604 |
| 601 # This runs with no env being passed along, so we get a clean environment | 605 # This runs with no env being passed along, so we get a clean environment |
| 602 # without any GYP_DEFINES being present to cause confusion. | 606 # without any GYP_DEFINES being present to cause confusion. |
| 603 self.m.python(name='generate_build_files', | 607 self.m.python(name='generate_build_files', |
| 604 script=self.m.path['checkout'].join('tools', 'mb', 'mb.py'), | 608 script=self.m.path['checkout'].join('tools', 'mb', 'mb.py'), |
| 605 args=args) | 609 args=args) |
| 606 | 610 |
| 607 def taskkill(self): | 611 def taskkill(self): |
| 608 self.m.python( | 612 self.m.python( |
| 609 'taskkill', | 613 'taskkill', |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 '--output', self.m.json.output(), | 767 '--output', self.m.json.output(), |
| 764 '--', | 768 '--', |
| 765 ] + self.get_common_args_for_scripts(), | 769 ] + self.get_common_args_for_scripts(), |
| 766 step_test_data=lambda: self.m.json.test_api.output({})) | 770 step_test_data=lambda: self.m.json.test_api.output({})) |
| 767 | 771 |
| 768 def download_lto_plugin(self): | 772 def download_lto_plugin(self): |
| 769 return self.m.python( | 773 return self.m.python( |
| 770 name='download LTO plugin', | 774 name='download LTO plugin', |
| 771 script=self.m.path['checkout'].join( | 775 script=self.m.path['checkout'].join( |
| 772 'build', 'download_gold_plugin.py')) | 776 'build', 'download_gold_plugin.py')) |
| OLD | NEW |