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

Side by Side Diff: infra/bots/recipes/swarm_perf.py

Issue 2209423002: [recipes] Remove build environment vars from default_env (Closed) Base URL: https://skia.googlesource.com/skia.git@merge_buildbot_spec_fix_coverage
Patch Set: [recipes] Remove build environment vars from default_env Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 # Recipe module for Skia Swarming perf. 6 # Recipe module for Skia Swarming perf.
7 7
8 8
9 DEPS = [ 9 DEPS = [
10 'build/file', 10 'build/file',
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 api.flavor.device_dirs.images_dir, 'nanobench'), 64 api.flavor.device_dirs.images_dir, 'nanobench'),
65 ] 65 ]
66 66
67 skip_flag = None 67 skip_flag = None
68 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': 68 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
69 skip_flag = '--nogpu' 69 skip_flag = '--nogpu'
70 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': 70 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
71 skip_flag = '--nocpu' 71 skip_flag = '--nocpu'
72 if skip_flag: 72 if skip_flag:
73 args.append(skip_flag) 73 args.append(skip_flag)
74 args.extend(api.vars.nanobench_flags) 74 args.extend(api.vars.builder_spec['nanobench_flags'])
75 75
76 if api.vars.upload_perf_results: 76 if api.vars.upload_perf_results:
77 json_path = api.flavor.device_path_join( 77 json_path = api.flavor.device_path_join(
78 api.flavor.device_dirs.perf_data_dir, 78 api.flavor.device_dirs.perf_data_dir,
79 'nanobench_%s.json' % api.vars.got_revision) 79 'nanobench_%s.json' % api.vars.got_revision)
80 args.extend(['--outResultsFile', json_path]) 80 args.extend(['--outResultsFile', json_path])
81 args.extend(properties) 81 args.extend(properties)
82 82
83 keys_blacklist = ['configuration', 'role', 'is_trybot'] 83 keys_blacklist = ['configuration', 'role', 'is_trybot']
84 args.append('--key') 84 args.append('--key')
85 for k in sorted(api.vars.builder_cfg.keys()): 85 for k in sorted(api.vars.builder_cfg.keys()):
86 if not k in keys_blacklist: 86 if not k in keys_blacklist:
87 args.extend([k, api.vars.builder_cfg[k]]) 87 args.extend([k, api.vars.builder_cfg[k]])
88 88
89 api.run(api.flavor.step, target, cmd=args, 89 api.run(api.flavor.step, target, cmd=args,
90 abort_on_failure=False, 90 abort_on_failure=False,
91 env=api.vars.default_env) 91 env=api.vars.default_env)
92 92
93 # See skia:2789. 93 # See skia:2789.
94 if ('Valgrind' in api.vars.builder_name and 94 if ('Valgrind' in api.vars.builder_name and
95 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'): 95 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'):
96 abandonGpuContext = list(args) 96 abandonGpuContext = list(args)
97 abandonGpuContext.extend(['--abandonGpuContext', '--nocpu']) 97 abandonGpuContext.extend(['--abandonGpuContext', '--nocpu'])
98 api.run(api.flavor.step, 98 api.run(api.flavor.step,
99 '%s --abandonGpuContext' % target, 99 '%s --abandonGpuContext' % target,
100 cmd=abandonGpuContext, abort_on_failure=False, 100 cmd=abandonGpuContext, abort_on_failure=False,
101 env=api.vars.default_env) 101 env=api.vars.default_env)
102 102
103 # Copy results to swarming out dir. 103 # Copy results to swarming out dir.
104 if api.vars.upload_perf_results: 104 if api.vars.upload_perf_results:
105 api.file.makedirs('perf_dir', api.vars.perf_data_dir) 105 api.file.makedirs('perf_dir', api.vars.perf_data_dir)
106 api.flavor.copy_directory_contents_to_host( 106 api.flavor.copy_directory_contents_to_host(
107 api.flavor.device_dirs.perf_data_dir, 107 api.flavor.device_dirs.perf_data_dir,
108 api.vars.perf_data_dir) 108 api.vars.perf_data_dir)
109 109
110 110
111 def RunSteps(api): 111 def RunSteps(api):
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 api.path.exists( 190 api.path.exists(
191 api.path['slave_build'].join('skia'), 191 api.path['slave_build'].join('skia'),
192 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 192 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
193 'skimage', 'VERSION'), 193 'skimage', 'VERSION'),
194 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', 194 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets',
195 'skp', 'VERSION'), 195 'skp', 'VERSION'),
196 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') 196 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt')
197 ) + 197 ) +
198 api.platform('win', 64) 198 api.platform('win', 64)
199 ) 199 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698