OLD | NEW |
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 from slave import recipe_api | 6 from slave import recipe_api |
7 from slave import recipe_config_types | 7 from slave import recipe_config_types |
8 from common.skia import builder_name_schema | 8 from common.skia import builder_name_schema |
9 from common.skia import global_constants | 9 from common.skia import global_constants |
10 from . import android_flavor | 10 from . import android_flavor |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 cwd=self.skia_dir) | 309 cwd=self.skia_dir) |
310 except self.m.step.StepFailure: | 310 except self.m.step.StepFailure: |
311 pass | 311 pass |
312 if self.m.path.exists(host_hashes_file): | 312 if self.m.path.exists(host_hashes_file): |
313 self.flavor.copy_file_to_device(host_hashes_file, hashes_file) | 313 self.flavor.copy_file_to_device(host_hashes_file, hashes_file) |
314 use_hash_file = True | 314 use_hash_file = True |
315 | 315 |
316 # Run DM. | 316 # Run DM. |
317 args = [ | 317 args = [ |
318 'dm', | 318 'dm', |
| 319 '--undefok', # This helps branches that may not know new flags. |
319 '--verbose', | 320 '--verbose', |
320 '--resourcePath', self.device_dirs.resource_dir, | 321 '--resourcePath', self.device_dirs.resource_dir, |
321 '--skps', self.device_dirs.skp_dir, | 322 '--skps', self.device_dirs.skp_dir, |
322 '--images', self.device_dirs.images_dir, | 323 '--images', self.device_dirs.images_dir, |
323 '--writePath', self.device_dirs.dm_dir, | 324 '--writePath', self.device_dirs.dm_dir, |
324 '--nameByHash', | 325 '--nameByHash', |
325 '--properties', 'gitHash', self.got_revision, | 326 '--properties', 'gitHash', self.got_revision, |
326 'build_number', self.m.properties['buildnumber'], | 327 'build_number', self.m.properties['buildnumber'], |
327 ] | 328 ] |
328 args.append('--key') | 329 args.append('--key') |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 if 'ZeroGPUCache' in self.c.BUILDER_NAME: | 388 if 'ZeroGPUCache' in self.c.BUILDER_NAME: |
388 return | 389 return |
389 | 390 |
390 self._run_once(self.install) | 391 self._run_once(self.install) |
391 self._run_once(self.download_and_copy_skps) | 392 self._run_once(self.download_and_copy_skps) |
392 is_perf = self.c.role == builder_name_schema.BUILDER_ROLE_PERF | 393 is_perf = self.c.role == builder_name_schema.BUILDER_ROLE_PERF |
393 if is_perf: | 394 if is_perf: |
394 self.flavor.create_clean_device_dir(self.device_dirs.perf_data_dir) | 395 self.flavor.create_clean_device_dir(self.device_dirs.perf_data_dir) |
395 | 396 |
396 # Run nanobench. | 397 # Run nanobench. |
397 args = ['nanobench', '-i', self.device_dirs.resource_dir, | 398 args = [ |
398 '--skps', self.device_dirs.skp_dir] | 399 'nanobench', |
| 400 '--undefok', # This helps branches that may not know new flags. |
| 401 '-i', self.device_dirs.resource_dir, |
| 402 '--skps', self.device_dirs.skp_dir |
| 403 ] |
399 | 404 |
400 skip_flag = None | 405 skip_flag = None |
401 if self.c.builder_cfg.get('cpu_or_gpu') == 'CPU': | 406 if self.c.builder_cfg.get('cpu_or_gpu') == 'CPU': |
402 skip_flag = '--nogpu' | 407 skip_flag = '--nogpu' |
403 elif self.c.builder_cfg.get('cpu_or_gpu') == 'GPU': | 408 elif self.c.builder_cfg.get('cpu_or_gpu') == 'GPU': |
404 skip_flag = '--nocpu' | 409 skip_flag = '--nocpu' |
405 if skip_flag: | 410 if skip_flag: |
406 args.append(skip_flag) | 411 args.append(skip_flag) |
407 | 412 |
408 args.extend(self.flags_from_file(self.skia_dir.join( | 413 args.extend(self.flags_from_file(self.skia_dir.join( |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 # TryBots are uploaded elsewhere so they can use the same key. | 466 # TryBots are uploaded elsewhere so they can use the same key. |
462 blacklist = ['role', 'is_trybot'] | 467 blacklist = ['role', 'is_trybot'] |
463 | 468 |
464 params = builder_name_schema.DictForBuilderName(self.c.BUILDER_NAME) | 469 params = builder_name_schema.DictForBuilderName(self.c.BUILDER_NAME) |
465 flat = [] | 470 flat = [] |
466 for k in sorted(params.keys()): | 471 for k in sorted(params.keys()): |
467 if k not in blacklist: | 472 if k not in blacklist: |
468 flat.append(k) | 473 flat.append(k) |
469 flat.append(params[k]) | 474 flat.append(params[k]) |
470 return flat | 475 return flat |
OLD | NEW |