| 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.InputPlaceholder): | 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder): |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 '--args=%s' % ' '.join(gn_args), | 574 '--args=%s' % ' '.join(gn_args), |
| 575 ] | 575 ] |
| 576 if str(gn_path).endswith('.py'): | 576 if str(gn_path).endswith('.py'): |
| 577 self.m.python(name='gn', script=gn_path, args=step_args, **kwargs) | 577 self.m.python(name='gn', script=gn_path, args=step_args, **kwargs) |
| 578 else: | 578 else: |
| 579 self.m.step(name='gn', cmd=[gn_path] + step_args, **kwargs) | 579 self.m.step(name='gn', cmd=[gn_path] + step_args, **kwargs) |
| 580 | 580 |
| 581 def run_mb(self, mastername, buildername, use_goma=True, | 581 def run_mb(self, mastername, buildername, use_goma=True, |
| 582 mb_config_path=None, isolated_targets=None, name=None, | 582 mb_config_path=None, isolated_targets=None, name=None, |
| 583 build_dir=None, android_version_code=None, | 583 build_dir=None, android_version_code=None, |
| 584 android_version_name=None): | 584 android_version_name=None, gyp_script=None): |
| 585 mb_config_path = (mb_config_path or | 585 mb_config_path = (mb_config_path or |
| 586 self.m.path['checkout'].join('tools', 'mb', | 586 self.m.path['checkout'].join('tools', 'mb', |
| 587 'mb_config.pyl')) | 587 'mb_config.pyl')) |
| 588 isolated_targets = isolated_targets or [] | 588 isolated_targets = isolated_targets or [] |
| 589 | 589 |
| 590 out_dir = 'out' | 590 out_dir = 'out' |
| 591 if self.c.TARGET_CROS_BOARD: | 591 if self.c.TARGET_CROS_BOARD: |
| 592 out_dir += '_%s' % self.c.TARGET_CROS_BOARD | 592 out_dir += '_%s' % self.c.TARGET_CROS_BOARD |
| 593 | 593 |
| 594 build_dir = build_dir or '//%s/%s' % (out_dir, self.c.build_config_fs) | 594 build_dir = build_dir or '//%s/%s' % (out_dir, self.c.build_config_fs) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 617 sorted_isolated_targets = sorted(set(isolated_targets)) | 617 sorted_isolated_targets = sorted(set(isolated_targets)) |
| 618 # TODO(dpranke): Change the MB flag to '--isolate-targets-file', maybe? | 618 # TODO(dpranke): Change the MB flag to '--isolate-targets-file', maybe? |
| 619 data = '\n'.join(sorted_isolated_targets) + '\n' | 619 data = '\n'.join(sorted_isolated_targets) + '\n' |
| 620 args += ['--swarming-targets-file', self.m.raw_io.input(data)] | 620 args += ['--swarming-targets-file', self.m.raw_io.input(data)] |
| 621 | 621 |
| 622 if android_version_code: | 622 if android_version_code: |
| 623 args += ['--android-version-code=%s' % android_version_code] | 623 args += ['--android-version-code=%s' % android_version_code] |
| 624 if android_version_name: | 624 if android_version_name: |
| 625 args += ['--android-version-name=%s' % android_version_name] | 625 args += ['--android-version-name=%s' % android_version_name] |
| 626 | 626 |
| 627 if gyp_script: |
| 628 args += ['--gyp-script=%s' % gyp_script] |
| 629 |
| 627 args += [build_dir] | 630 args += [build_dir] |
| 628 | 631 |
| 629 # This runs with an almost-bare env being passed along, so we get a clean | 632 # This runs with an almost-bare env being passed along, so we get a clean |
| 630 # environment without any GYP_DEFINES being present to cause confusion. | 633 # environment without any GYP_DEFINES being present to cause confusion. |
| 631 kwargs = { | 634 kwargs = { |
| 632 'name': name or 'generate_build_files', | 635 'name': name or 'generate_build_files', |
| 633 'script': self.m.path['checkout'].join('tools', 'mb', 'mb.py'), | 636 'script': self.m.path['checkout'].join('tools', 'mb', 'mb.py'), |
| 634 'args': args, | 637 'args': args, |
| 635 'env': { | 638 'env': { |
| 636 'GOMA_SERVICE_ACCOUNT_JSON_FILE': self.m.goma.service_account_json_path, | 639 'GOMA_SERVICE_ACCOUNT_JSON_FILE': self.m.goma.service_account_json_path, |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 })) | 773 })) |
| 771 | 774 |
| 772 def get_annotate_by_test_name(self, test_name): | 775 def get_annotate_by_test_name(self, test_name): |
| 773 return 'graphing' | 776 return 'graphing' |
| 774 | 777 |
| 775 def download_lto_plugin(self): | 778 def download_lto_plugin(self): |
| 776 return self.m.python( | 779 return self.m.python( |
| 777 name='download LTO plugin', | 780 name='download LTO plugin', |
| 778 script=self.m.path['checkout'].join( | 781 script=self.m.path['checkout'].join( |
| 779 'build', 'download_gold_plugin.py')) | 782 'build', 'download_gold_plugin.py')) |
| OLD | NEW |