| 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 from slave import recipe_api | 5 from slave import recipe_api |
| 6 from slave import recipe_util | 6 from slave import recipe_util |
| 7 | 7 |
| 8 | 8 |
| 9 class TestLauncherFilterFileInputPlaceholder(recipe_util.Placeholder): | 9 class TestLauncherFilterFileInputPlaceholder(recipe_util.Placeholder): |
| 10 def __init__(self, api, tests): | 10 def __init__(self, api, tests): |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 def run_telemetry_perf_unittests(self): | 223 def run_telemetry_perf_unittests(self): |
| 224 return self.runtest( | 224 return self.runtest( |
| 225 self.m.path['checkout'].join('tools', 'perf', 'run_tests'), | 225 self.m.path['checkout'].join('tools', 'perf', 'run_tests'), |
| 226 args=['--browser=%s' % self.c.BUILD_CONFIG.lower()], | 226 args=['--browser=%s' % self.c.BUILD_CONFIG.lower()], |
| 227 annotate='gtest', | 227 annotate='gtest', |
| 228 name='telemetry_perf_unittests', | 228 name='telemetry_perf_unittests', |
| 229 test_type='telemetry_perf_unittests', | 229 test_type='telemetry_perf_unittests', |
| 230 python_mode=True, | 230 python_mode=True, |
| 231 xvfb=True) | 231 xvfb=True) |
| 232 | 232 |
| 233 def runhooks(self, **kwargs): | 233 def runhooks(self, run_gyp=True, **kwargs): |
| 234 """Run the build-configuration hooks for chromium.""" | 234 """Run the build-configuration hooks for chromium.""" |
| 235 env = kwargs.get('env', {}) | 235 env = kwargs.get('env', {}) |
| 236 env.update(self.c.gyp_env.as_jsonish()) | 236 if run_gyp: |
| 237 env.update(self.c.gyp_env.as_jsonish()) |
| 238 else: |
| 239 env['GYP_CHROMIUM_NO_ACTION'] = 1 |
| 237 kwargs['env'] = env | 240 kwargs['env'] = env |
| 238 return self.m.gclient.runhooks(**kwargs) | 241 return self.m.gclient.runhooks(**kwargs) |
| 239 | 242 |
| 243 def compile_with_ninja(self, name, output_dir): |
| 244 ninja_path = self.m.path['depot_tools'].join('ninja', |
| 245 platform_ext={'win': '.exe'}) |
| 246 return self.m.step(name=name, cmd=[ninja_path, '-C', output_dir]) |
| 247 |
| 248 def run_gn(self, output_dir): |
| 249 config = self.c.BUILD_CONFIG |
| 250 gn_wrapper_script_path = self.m.path['depot_tools'].join('gn.py') |
| 251 gn_build_config_specific_args = { |
| 252 'Debug': ['--args=is_debug=true'], |
| 253 'Release': ['--args=is_debug=false'], |
| 254 } |
| 255 gn_args = ['gen', '-o', output_dir] + gn_build_config_specific_args[config] |
| 256 return self.m.python('gn', gn_wrapper_script_path, args=gn_args) |
| 257 |
| 240 def taskkill(self): | 258 def taskkill(self): |
| 241 return self.m.python( | 259 return self.m.python( |
| 242 'taskkill', | 260 'taskkill', |
| 243 self.m.path['build'].join('scripts', 'slave', 'kill_processes.py')) | 261 self.m.path['build'].join('scripts', 'slave', 'kill_processes.py')) |
| 244 | 262 |
| 245 def cleanup_temp(self): | 263 def cleanup_temp(self): |
| 246 return self.m.python( | 264 return self.m.python( |
| 247 'cleanup_temp', | 265 'cleanup_temp', |
| 248 self.m.path['build'].join('scripts', 'slave', 'cleanup_temp.py')) | 266 self.m.path['build'].join('scripts', 'slave', 'cleanup_temp.py')) |
| 249 | 267 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 '--json', self.m.json.output()], | 316 '--json', self.m.json.output()], |
| 299 step_test_data=lambda: self.m.json.test_api.output([]), | 317 step_test_data=lambda: self.m.json.test_api.output([]), |
| 300 **kwargs) | 318 **kwargs) |
| 301 | 319 |
| 302 def deps2submodules(self, **kwargs): | 320 def deps2submodules(self, **kwargs): |
| 303 return self.m.python( | 321 return self.m.python( |
| 304 'deps2submodules', | 322 'deps2submodules', |
| 305 self.m.path['checkout'].join('tools', 'deps2git', 'deps2submodules.py'), | 323 self.m.path['checkout'].join('tools', 'deps2git', 'deps2submodules.py'), |
| 306 args=['--gitless', self.m.path['checkout'].join('.DEPS.git')], | 324 args=['--gitless', self.m.path['checkout'].join('.DEPS.git')], |
| 307 **kwargs) | 325 **kwargs) |
| OLD | NEW |