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