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

Side by Side Diff: infra/bots/recipe_modules/flavor/default_flavor.py

Issue 2358173002: GN: take over CommandBuffer bot (Closed)
Patch Set: GYP too Created 4 years, 3 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
« no previous file with comments | « gyp/gputest.gyp ('k') | infra/bots/recipe_modules/flavor/gn_flavor.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 5
6 # pylint: disable=W0201 6 # pylint: disable=W0201
7 7
8 8
9 """Default flavor utils class, used for desktop builders.""" 9 """Default flavor utils class, used for desktop builders."""
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 'bootstrap_win_toolchain_json.py') 110 'bootstrap_win_toolchain_json.py')
111 win_toolchain_json = self._win_toolchain_dir.join( 111 win_toolchain_json = self._win_toolchain_dir.join(
112 'src', 'build', 'win_toolchain.json') 112 'src', 'build', 'win_toolchain.json')
113 self.m.python( 113 self.m.python(
114 'bootstrap win toolchain', 114 'bootstrap win toolchain',
115 script=bootstrap_script, 115 script=bootstrap_script,
116 args=['--win_toolchain_json', win_toolchain_json, 116 args=['--win_toolchain_json', win_toolchain_json,
117 '--depot_tools_parent_dir', 117 '--depot_tools_parent_dir',
118 self._win_toolchain_dir]) 118 self._win_toolchain_dir])
119 119
120 def build_command_buffer(self, **kwargs):
121 """Build command_buffer."""
122 script = self.m.vars.skia_dir.join('tools', 'build_command_buffer.py')
123 self.m.run(
124 self.m.python, 'build command_buffer',
125 script=script,
126 args=['--chrome-dir', self.m.vars.checkout_root,
127 '--output-dir', self.out_dir,
128 '--chrome-build-type', self.m.vars.configuration,
129 '--no-sync'],
130 **kwargs)
131
132 def compile(self, target, **kwargs): 120 def compile(self, target, **kwargs):
133 """Build the given target.""" 121 """Build the given target."""
134 env = kwargs.pop('env', {}) 122 env = kwargs.pop('env', {})
135 # The CHROME_PATH environment variable is needed for builders that use 123 # The CHROME_PATH environment variable is needed for builders that use
136 # toolchains downloaded by Chrome. 124 # toolchains downloaded by Chrome.
137 env['CHROME_PATH'] = self.chrome_path 125 env['CHROME_PATH'] = self.chrome_path
138 if self.m.platform.is_win: 126 if self.m.platform.is_win:
139 make_cmd = ['python', 'make.py'] 127 make_cmd = ['python', 'make.py']
140 self.m.run.run_once(self.bootstrap_win_toolchain) 128 self.m.run.run_once(self.bootstrap_win_toolchain)
141 if 'Vulkan' in self.m.vars.builder_name: 129 if 'Vulkan' in self.m.vars.builder_name:
142 env['VULKAN_SDK'] = self.m.vars.slave_dir.join('win_vulkan_sdk') 130 env['VULKAN_SDK'] = self.m.vars.slave_dir.join('win_vulkan_sdk')
143 else: 131 else:
144 make_cmd = ['make'] 132 make_cmd = ['make']
145 cmd = make_cmd + [target] 133 cmd = make_cmd + [target]
146 try: 134 try:
147 self.m.run(self.m.step, 'build %s' % target, cmd=cmd, 135 self.m.run(self.m.step, 'build %s' % target, cmd=cmd,
148 env=env, cwd=self.m.path['checkout'], **kwargs) 136 env=env, cwd=self.m.path['checkout'], **kwargs)
149 except self.m.step.StepFailure: 137 except self.m.step.StepFailure:
150 if self.m.platform.is_win: 138 if self.m.platform.is_win:
151 # The linker occasionally crashes on Windows. Try again. 139 # The linker occasionally crashes on Windows. Try again.
152 self.m.run(self.m.step, 'build %s' % target, cmd=cmd, 140 self.m.run(self.m.step, 'build %s' % target, cmd=cmd,
153 env=env, cwd=self.m.path['checkout'], **kwargs) 141 env=env, cwd=self.m.path['checkout'], **kwargs)
154 else: 142 else:
155 raise 143 raise
156 if 'CommandBuffer' in self.m.vars.builder_name:
157 self.m.run.run_once(self.build_command_buffer, env=env)
158 144
159 def copy_extra_build_products(self, swarming_out_dir): 145 def copy_extra_build_products(self, swarming_out_dir):
160 """Copy extra build products to specified directory. 146 """Copy extra build products to specified directory.
161 147
162 Copy flavor-specific build products to swarming_out_dir for use in test and 148 Copy flavor-specific build products to swarming_out_dir for use in test and
163 perf steps.""" 149 perf steps."""
164 if ("Win" in self.m.vars.builder_name and 150 if ("Win" in self.m.vars.builder_name and
165 "Vulkan" in self.m.vars.builder_name): 151 "Vulkan" in self.m.vars.builder_name):
166 # This copies vulkan-1.dll that has been bundled into win_vulkan_sdk 152 # This copies vulkan-1.dll that has been bundled into win_vulkan_sdk
167 # since version 2 See skia/api BUILD_PRODUCTS_ISOLATE_WHITELIST 153 # since version 2 See skia/api BUILD_PRODUCTS_ISOLATE_WHITELIST
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 perf_data_dir=self.m.vars.perf_data_dir, 211 perf_data_dir=self.m.vars.perf_data_dir,
226 resource_dir=self.m.vars.resource_dir, 212 resource_dir=self.m.vars.resource_dir,
227 images_dir=self.m.vars.images_dir, 213 images_dir=self.m.vars.images_dir,
228 skp_dir=self.m.vars.local_skp_dir, 214 skp_dir=self.m.vars.local_skp_dir,
229 svg_dir=self.m.vars.local_svg_dir, 215 svg_dir=self.m.vars.local_svg_dir,
230 tmp_dir=self.m.vars.tmp_dir) 216 tmp_dir=self.m.vars.tmp_dir)
231 217
232 def cleanup_steps(self): 218 def cleanup_steps(self):
233 """Run any device-specific cleanup steps.""" 219 """Run any device-specific cleanup steps."""
234 pass 220 pass
OLDNEW
« no previous file with comments | « gyp/gputest.gyp ('k') | infra/bots/recipe_modules/flavor/gn_flavor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698