Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Side by Side Diff: scripts/slave/recipe_modules/chromium/api.py

Issue 2033513002: recipes: Switch from 3 ways for requesting clobber builds to 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@master
Patch Set: presubmit2 Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 # Note that we have to call gclient.set_config() and apply_config() *after* 148 # Note that we have to call gclient.set_config() and apply_config() *after*
149 # calling chromium.set_config(), above, because otherwise the chromium 149 # calling chromium.set_config(), above, because otherwise the chromium
150 # call would reset the gclient config to its defaults. 150 # call would reset the gclient config to its defaults.
151 self.m.gclient.set_config( 151 self.m.gclient.set_config(
152 'chromium', PATCH_PROJECT=self.m.properties.get('patch_project')) 152 'chromium', PATCH_PROJECT=self.m.properties.get('patch_project'))
153 for c in bot_config.get('gclient_apply_config', []): 153 for c in bot_config.get('gclient_apply_config', []):
154 self.m.gclient.apply_config(c) 154 self.m.gclient.apply_config(c)
155 155
156 return (buildername, bot_config) 156 return (buildername, bot_config)
157 157
158 def compile(self, targets=None, name=None, force_clobber=False, out_dir=None, 158 def compile(self, targets=None, name=None, out_dir=None,
159 target=None, **kwargs): 159 target=None, **kwargs):
160 """Return a compile.py invocation.""" 160 """Return a compile.py invocation."""
161 targets = targets or self.c.compile_py.default_targets.as_jsonish() 161 targets = targets or self.c.compile_py.default_targets.as_jsonish()
162 assert isinstance(targets, (list, tuple)) 162 assert isinstance(targets, (list, tuple))
163 163
164 if self.c.gyp_env.GYP_DEFINES.get('clang', 0) == 1: 164 if self.c.gyp_env.GYP_DEFINES.get('clang', 0) == 1:
165 # Get the Clang revision before compiling. 165 # Get the Clang revision before compiling.
166 self._clang_version = self.get_clang_version() 166 self._clang_version = self.get_clang_version()
167 167
168 args = [ 168 args = [
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if self.c.compile_py.goma_store_local_run_output: 212 if self.c.compile_py.goma_store_local_run_output:
213 args += ['--goma-store-local-run-output'] 213 args += ['--goma-store-local-run-output']
214 if self.c.compile_py.goma_enable_compiler_info_cache: 214 if self.c.compile_py.goma_enable_compiler_info_cache:
215 args += ['--goma-enable-compiler-info-cache'] 215 args += ['--goma-enable-compiler-info-cache']
216 if self.m.tryserver.is_tryserver: 216 if self.m.tryserver.is_tryserver:
217 # We rely on goma to meet cycle time goals on the tryserver. It's better 217 # We rely on goma to meet cycle time goals on the tryserver. It's better
218 # to fail early. 218 # to fail early.
219 args += ['--goma-fail-fast', '--goma-disable-local-fallback'] 219 args += ['--goma-fail-fast', '--goma-disable-local-fallback']
220 if self.c.compile_py.ninja_confirm_noop: 220 if self.c.compile_py.ninja_confirm_noop:
221 args.append('--ninja-ensure-up-to-date') 221 args.append('--ninja-ensure-up-to-date')
222 if (self.m.properties.get('clobber') is not None or 222 if self.c.compile_py.clobber:
223 self.c.compile_py.clobber or
224 force_clobber):
225 args.append('--clobber') 223 args.append('--clobber')
226 if self.c.compile_py.pass_arch_flag: 224 if self.c.compile_py.pass_arch_flag:
227 args += ['--arch', self.c.gyp_env.GYP_DEFINES['target_arch']] 225 args += ['--arch', self.c.gyp_env.GYP_DEFINES['target_arch']]
228 if self.c.TARGET_CROS_BOARD: 226 if self.c.TARGET_CROS_BOARD:
229 args += ['--cros-board', self.c.TARGET_CROS_BOARD] 227 args += ['--cros-board', self.c.TARGET_CROS_BOARD]
230 228
231 assert not self.c.compile_py.solution 229 assert not self.c.compile_py.solution
232 args.append('--') 230 args.append('--')
233 if self.c.compile_py.build_tool == 'xcode': 231 if self.c.compile_py.build_tool == 'xcode':
234 if self.c.compile_py.xcode_project: # pragma: no cover 232 if self.c.compile_py.xcode_project: # pragma: no cover
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 })) 757 }))
760 758
761 def get_annotate_by_test_name(self, test_name): 759 def get_annotate_by_test_name(self, test_name):
762 return 'graphing' 760 return 'graphing'
763 761
764 def download_lto_plugin(self): 762 def download_lto_plugin(self):
765 return self.m.python( 763 return self.m.python(
766 name='download LTO plugin', 764 name='download LTO plugin',
767 script=self.m.path['checkout'].join( 765 script=self.m.path['checkout'].join(
768 'build', 'download_gold_plugin.py')) 766 'build', 'download_gold_plugin.py'))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium/config.py » ('j') | scripts/slave/recipe_modules/pgo/example.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698