| 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 '--args=%s' % ' '.join(gn_args), | 570 '--args=%s' % ' '.join(gn_args), |
| 571 ] | 571 ] |
| 572 if str(gn_path).endswith('.py'): | 572 if str(gn_path).endswith('.py'): |
| 573 self.m.python(name='gn', script=gn_path, args=step_args, **kwargs) | 573 self.m.python(name='gn', script=gn_path, args=step_args, **kwargs) |
| 574 else: | 574 else: |
| 575 self.m.step(name='gn', cmd=[gn_path] + step_args, **kwargs) | 575 self.m.step(name='gn', cmd=[gn_path] + step_args, **kwargs) |
| 576 | 576 |
| 577 def run_mb(self, mastername, buildername, use_goma=True, | 577 def run_mb(self, mastername, buildername, use_goma=True, |
| 578 mb_config_path=None, isolated_targets=None, name=None, | 578 mb_config_path=None, isolated_targets=None, name=None, |
| 579 build_dir=None, android_version_code=None, | 579 build_dir=None, android_version_code=None, |
| 580 android_version_name=None, gyp_script=None): | 580 android_version_name=None, gyp_script=None, **kwargs): |
| 581 mb_config_path = (mb_config_path or | 581 mb_config_path = (mb_config_path or |
| 582 self.m.path['checkout'].join('tools', 'mb', | 582 self.m.path['checkout'].join('tools', 'mb', |
| 583 'mb_config.pyl')) | 583 'mb_config.pyl')) |
| 584 isolated_targets = isolated_targets or [] | 584 isolated_targets = isolated_targets or [] |
| 585 | 585 |
| 586 out_dir = 'out' | 586 out_dir = 'out' |
| 587 if self.c.TARGET_CROS_BOARD: | 587 if self.c.TARGET_CROS_BOARD: |
| 588 out_dir += '_%s' % self.c.TARGET_CROS_BOARD | 588 out_dir += '_%s' % self.c.TARGET_CROS_BOARD |
| 589 | 589 |
| 590 build_dir = build_dir or '//%s/%s' % (out_dir, self.c.build_config_fs) | 590 build_dir = build_dir or '//%s/%s' % (out_dir, self.c.build_config_fs) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 620 if android_version_name: | 620 if android_version_name: |
| 621 args += ['--android-version-name=%s' % android_version_name] | 621 args += ['--android-version-name=%s' % android_version_name] |
| 622 | 622 |
| 623 if gyp_script: | 623 if gyp_script: |
| 624 args += ['--gyp-script=%s' % gyp_script] | 624 args += ['--gyp-script=%s' % gyp_script] |
| 625 | 625 |
| 626 args += [build_dir] | 626 args += [build_dir] |
| 627 | 627 |
| 628 # This runs with an almost-bare env being passed along, so we get a clean | 628 # This runs with an almost-bare env being passed along, so we get a clean |
| 629 # environment without any GYP_DEFINES being present to cause confusion. | 629 # environment without any GYP_DEFINES being present to cause confusion. |
| 630 kwargs = { | 630 step_kwargs = { |
| 631 'name': name or 'generate_build_files', | 631 'name': name or 'generate_build_files', |
| 632 'script': self.m.path['checkout'].join('tools', 'mb', 'mb.py'), | 632 'script': self.m.path['checkout'].join('tools', 'mb', 'mb.py'), |
| 633 'args': args, | 633 'args': args, |
| 634 'env': { | 634 'env': { |
| 635 'GOMA_SERVICE_ACCOUNT_JSON_FILE': self.m.goma.service_account_json_path, | 635 'GOMA_SERVICE_ACCOUNT_JSON_FILE': self.m.goma.service_account_json_path, |
| 636 } | 636 } |
| 637 } | 637 } |
| 638 if self.c.env.FORCE_MAC_TOOLCHAIN: | 638 if self.c.env.FORCE_MAC_TOOLCHAIN: |
| 639 kwargs['env']['FORCE_MAC_TOOLCHAIN'] = self.c.env.FORCE_MAC_TOOLCHAIN | 639 step_kwargs['env']['FORCE_MAC_TOOLCHAIN'] = ( |
| 640 self.c.env.FORCE_MAC_TOOLCHAIN) |
| 640 | 641 |
| 641 if self.c.TARGET_CROS_BOARD: | 642 if self.c.TARGET_CROS_BOARD: |
| 642 # Wrap 'runhooks' through 'cros chrome-sdk' | 643 # Wrap 'runhooks' through 'cros chrome-sdk' |
| 643 kwargs['wrapper'] = self.get_cros_chrome_sdk_wrapper(clean=True) | 644 step_kwargs['wrapper'] = self.get_cros_chrome_sdk_wrapper(clean=True) |
| 644 | 645 |
| 645 self.m.python(**kwargs) | 646 step_kwargs.update(kwargs) |
| 647 self.m.python(**step_kwargs) |
| 646 | 648 |
| 647 # Comes after self.m.python so the log appears in the correct step result. | 649 # Comes after self.m.python so the log appears in the correct step result. |
| 648 result = self.m.step.active_result | 650 result = self.m.step.active_result |
| 649 if isolated_targets and result: | 651 if isolated_targets and result: |
| 650 result.presentation.logs['swarming-targets-file.txt'] = ( | 652 result.presentation.logs['swarming-targets-file.txt'] = ( |
| 651 sorted_isolated_targets) | 653 sorted_isolated_targets) |
| 652 | 654 |
| 653 | 655 |
| 654 def update_clang(self): | 656 def update_clang(self): |
| 655 # The hooks in DEPS call `update.py --if-needed`, which updates clang by | 657 # The hooks in DEPS call `update.py --if-needed`, which updates clang by |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 })) | 771 })) |
| 770 | 772 |
| 771 def get_annotate_by_test_name(self, test_name): | 773 def get_annotate_by_test_name(self, test_name): |
| 772 return 'graphing' | 774 return 'graphing' |
| 773 | 775 |
| 774 def download_lto_plugin(self): | 776 def download_lto_plugin(self): |
| 775 return self.m.python( | 777 return self.m.python( |
| 776 name='download LTO plugin', | 778 name='download LTO plugin', |
| 777 script=self.m.path['checkout'].join( | 779 script=self.m.path['checkout'].join( |
| 778 'build', 'download_gold_plugin.py')) | 780 'build', 'download_gold_plugin.py')) |
| OLD | NEW |