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

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

Issue 1919193002: build: roll infra_paths changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 7 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 | Annotate | Revision Log
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 # (in chromium/config.py), and the buildside gypfiles are as dumb as 43 # (in chromium/config.py), and the buildside gypfiles are as dumb as
44 # possible. However, since the recipes need to accurately contain 44 # possible. However, since the recipes need to accurately contain
45 # {TARGET,HOST}_{BITS,ARCH,PLATFORM}, for use across many tools (of which 45 # {TARGET,HOST}_{BITS,ARCH,PLATFORM}, for use across many tools (of which
46 # gyp is one tool), we're taking a small risk and replicating the logic 46 # gyp is one tool), we're taking a small risk and replicating the logic
47 # here. 47 # here.
48 'TARGET_BITS': ( 48 'TARGET_BITS': (
49 32 if self.m.platform.name == 'win' 49 32 if self.m.platform.name == 'win'
50 else self.m.platform.bits), 50 else self.m.platform.bits),
51 51
52 'BUILD_CONFIG': self.m.properties.get('build_config', 'Release'), 52 'BUILD_CONFIG': self.m.properties.get('build_config', 'Release'),
53
54 'BUILD_PATH': self.m.infra_paths['build'],
53 } 55 }
54 56
55 def get_env(self): 57 def get_env(self):
56 ret = {} 58 ret = {}
57 if self.c.env.PATH: 59 if self.c.env.PATH:
58 ret['PATH'] = self.m.path.pathsep.join( 60 ret['PATH'] = self.m.path.pathsep.join(
59 map(str, self.c.env.PATH) + ['%(PATH)s']) 61 map(str, self.c.env.PATH) + ['%(PATH)s'])
60 if self.c.env.ADB_VENDOR_KEYS: 62 if self.c.env.ADB_VENDOR_KEYS:
61 ret['ADB_VENDOR_KEYS'] = self.c.env.ADB_VENDOR_KEYS 63 ret['ADB_VENDOR_KEYS'] = self.c.env.ADB_VENDOR_KEYS
62 if self.c.env.LLVM_FORCE_HEAD_REVISION: 64 if self.c.env.LLVM_FORCE_HEAD_REVISION:
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 self._clang_version = self.get_clang_version() 157 self._clang_version = self.get_clang_version()
156 158
157 args = [ 159 args = [
158 '--show-path', 160 '--show-path',
159 'python', 161 'python',
160 self.package_repo_resource('scripts', 'slave', 'compile.py'), 162 self.package_repo_resource('scripts', 'slave', 'compile.py'),
161 '--gsutil-py-path', self.m.depot_tools.gsutil_py_path, 163 '--gsutil-py-path', self.m.depot_tools.gsutil_py_path,
162 '--ninja-path', self.m.depot_tools.ninja_path, 164 '--ninja-path', self.m.depot_tools.ninja_path,
163 '--target', target or self.c.build_config_fs, 165 '--target', target or self.c.build_config_fs,
164 '--src-dir', self.m.path['checkout'], 166 '--src-dir', self.m.path['checkout'],
165 '--goma-cache-dir', self.m.path['goma_cache'], 167 '--goma-cache-dir', self.m.infra_paths['goma_cache'],
166 ] 168 ]
167 if self.c.compile_py.build_args: 169 if self.c.compile_py.build_args:
168 args += ['--build-args', self.c.compile_py.build_args] 170 args += ['--build-args', self.c.compile_py.build_args]
169 if self.c.compile_py.build_tool: 171 if self.c.compile_py.build_tool:
170 args += ['--build-tool', self.c.compile_py.build_tool] 172 args += ['--build-tool', self.c.compile_py.build_tool]
171 if self.m.properties.get('build_data_dir'): 173 if self.m.properties.get('build_data_dir'):
172 args += ['--build-data-dir', self.m.properties.get('build_data_dir')] 174 args += ['--build-data-dir', self.m.properties.get('build_data_dir')]
173 if self.c.compile_py.cross_tool: 175 if self.c.compile_py.cross_tool:
174 args += ['--crosstool', self.c.compile_py.cross_tool] 176 args += ['--crosstool', self.c.compile_py.cross_tool]
175 if self.c.compile_py.compiler: 177 if self.c.compile_py.compiler:
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 # rather than setting the gn_args flags via a parameter passed to 524 # rather than setting the gn_args flags via a parameter passed to
523 # run_gn(). We shouldn't have *three* different mechanisms to control 525 # run_gn(). We shouldn't have *three* different mechanisms to control
524 # what args to use. 526 # what args to use.
525 if use_goma: 527 if use_goma:
526 gn_args.append('use_goma=true') 528 gn_args.append('use_goma=true')
527 gn_args.append('goma_dir="%s"' % self.c.compile_py.goma_dir) 529 gn_args.append('goma_dir="%s"' % self.c.compile_py.goma_dir)
528 gn_args.extend(self.c.project_generator.args) 530 gn_args.extend(self.c.project_generator.args)
529 531
530 self.m.python( 532 self.m.python(
531 name='gn', 533 name='gn',
532 script=self.m.path['depot_tools'].join('gn.py'), 534 script=self.m.infra_paths['depot_tools'].join('gn.py'),
533 args=[ 535 args=[
534 '--root=%s' % str(self.m.path['checkout']), 536 '--root=%s' % str(self.m.path['checkout']),
535 'gen', 537 'gen',
536 build_dir, 538 build_dir,
537 '--args=%s' % ' '.join(gn_args), 539 '--args=%s' % ' '.join(gn_args),
538 ]) 540 ])
539 541
540 def run_mb(self, mastername, buildername, use_goma=True, 542 def run_mb(self, mastername, buildername, use_goma=True,
541 mb_config_path=None, isolated_targets=None, name=None, 543 mb_config_path=None, isolated_targets=None, name=None,
542 build_dir=None, android_version_code=None, 544 build_dir=None, android_version_code=None,
(...skipping 14 matching lines...) Expand all
557 if use_goma: 559 if use_goma:
558 goma_dir = self.c.compile_py.goma_dir 560 goma_dir = self.c.compile_py.goma_dir
559 if not goma_dir: 561 if not goma_dir:
560 # This method defaults to use_goma=True, which doesn't necessarily 562 # This method defaults to use_goma=True, which doesn't necessarily
561 # match build-side configuration. However, MB is configured 563 # match build-side configuration. However, MB is configured
562 # src-side, and so it might be actually using goma. 564 # src-side, and so it might be actually using goma.
563 self.ensure_goma() 565 self.ensure_goma()
564 goma_dir = self.c.compile_py.goma_dir 566 goma_dir = self.c.compile_py.goma_dir
565 if not goma_dir: # pragma: no cover 567 if not goma_dir: # pragma: no cover
566 # TODO(phajdan.jr): remove fallback when we always use cipd for goma. 568 # TODO(phajdan.jr): remove fallback when we always use cipd for goma.
567 goma_dir = self.m.path['build'].join('goma') 569 goma_dir = self.m.infra_paths['build'].join('goma')
568 args += ['--goma-dir', goma_dir] 570 args += ['--goma-dir', goma_dir]
569 571
570 if isolated_targets: 572 if isolated_targets:
571 sorted_isolated_targets = sorted(set(isolated_targets)) 573 sorted_isolated_targets = sorted(set(isolated_targets))
572 # TODO(dpranke): Change the MB flag to '--isolate-targets-file', maybe? 574 # TODO(dpranke): Change the MB flag to '--isolate-targets-file', maybe?
573 data = '\n'.join(sorted_isolated_targets) + '\n' 575 data = '\n'.join(sorted_isolated_targets) + '\n'
574 args += ['--swarming-targets-file', self.m.raw_io.input(data)] 576 args += ['--swarming-targets-file', self.m.raw_io.input(data)]
575 577
576 if android_version_code: 578 if android_version_code:
577 args += ['--android-version-code=%s' % android_version_code] 579 args += ['--android-version-code=%s' % android_version_code]
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 })) 712 }))
711 713
712 def get_annotate_by_test_name(self, test_name): 714 def get_annotate_by_test_name(self, test_name):
713 return 'graphing' 715 return 'graphing'
714 716
715 def download_lto_plugin(self): 717 def download_lto_plugin(self):
716 return self.m.python( 718 return self.m.python(
717 name='download LTO plugin', 719 name='download LTO plugin',
718 script=self.m.path['checkout'].join( 720 script=self.m.path['checkout'].join(
719 'build', 'download_gold_plugin.py')) 721 'build', 'download_gold_plugin.py'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698