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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 self.apply_config(c) | 131 self.apply_config(c) |
132 | 132 |
133 # Note that we have to call gclient.set_config() and apply_config() *after* | 133 # Note that we have to call gclient.set_config() and apply_config() *after* |
134 # calling chromium.set_config(), above, because otherwise the chromium | 134 # calling chromium.set_config(), above, because otherwise the chromium |
135 # call would reset the gclient config to its defaults. | 135 # call would reset the gclient config to its defaults. |
136 self.m.gclient.set_config( | 136 self.m.gclient.set_config( |
137 'chromium', PATCH_PROJECT=self.m.properties.get('patch_project')) | 137 'chromium', PATCH_PROJECT=self.m.properties.get('patch_project')) |
138 for c in bot_config.get('gclient_apply_config', []): | 138 for c in bot_config.get('gclient_apply_config', []): |
139 self.m.gclient.apply_config(c) | 139 self.m.gclient.apply_config(c) |
140 | 140 |
141 if bot_config.get('set_component_rev'): | |
142 # If this is a component build and the main revision is e.g. blink, | |
143 # webrtc, or v8, the custom deps revision of this component must be | |
144 # dynamically set to either: | |
145 # (1) 'revision' from the waterfall, or | |
146 # (2) 'HEAD' for forced builds with unspecified 'revision'. | |
147 # TODO(machenbach): If this method is used on testers it also needs case | |
148 # (3) parent_got_revision. | |
149 component_rev = self.m.properties.get('revision') or 'HEAD' | |
150 dep = bot_config.get('set_component_rev') | |
151 self.m.gclient.c.revisions[dep['name']] = dep['rev_str'] % component_rev | |
152 | |
153 return (buildername, bot_config) | 141 return (buildername, bot_config) |
154 | 142 |
155 def compile(self, targets=None, name=None, force_clobber=False, out_dir=None, | 143 def compile(self, targets=None, name=None, force_clobber=False, out_dir=None, |
156 target=None, **kwargs): | 144 target=None, **kwargs): |
157 """Return a compile.py invocation.""" | 145 """Return a compile.py invocation.""" |
158 targets = targets or self.c.compile_py.default_targets.as_jsonish() | 146 targets = targets or self.c.compile_py.default_targets.as_jsonish() |
159 assert isinstance(targets, (list, tuple)) | 147 assert isinstance(targets, (list, tuple)) |
160 | 148 |
161 if self.c.gyp_env.GYP_DEFINES.get('clang', 0) == 1: | 149 if self.c.gyp_env.GYP_DEFINES.get('clang', 0) == 1: |
162 # Get the Clang revision before compiling. | 150 # Get the Clang revision before compiling. |
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 })) | 703 })) |
716 | 704 |
717 def get_annotate_by_test_name(self, test_name): | 705 def get_annotate_by_test_name(self, test_name): |
718 return 'graphing' | 706 return 'graphing' |
719 | 707 |
720 def download_lto_plugin(self): | 708 def download_lto_plugin(self): |
721 return self.m.python( | 709 return self.m.python( |
722 name='download LTO plugin', | 710 name='download LTO plugin', |
723 script=self.m.path['checkout'].join( | 711 script=self.m.path['checkout'].join( |
724 'build', 'download_gold_plugin.py')) | 712 'build', 'download_gold_plugin.py')) |
OLD | NEW |