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

Side by Side Diff: scripts/slave/recipes/bisection/desktop_bisect.py

Issue 2228473002: bisection: prepare for running under remote_run (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: 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 (c) 2015 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2015 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 DEPS = [ 5 DEPS = [
6 'auto_bisect', 6 'auto_bisect',
7 'bisect_tester', 7 'bisect_tester',
8 'chromium', 8 'chromium',
9 'chromium_tests', 9 'chromium_tests',
10 'depot_tools/gclient', 10 'depot_tools/gclient',
(...skipping 17 matching lines...) Expand all
28 api.gclient.apply_config('perf') 28 api.gclient.apply_config('perf')
29 # TODO(robertocn): remove do_not_nest_wait_for_revision once downstream 29 # TODO(robertocn): remove do_not_nest_wait_for_revision once downstream
30 # expectations have been fixed, and make it behave like this by default. 30 # expectations have been fixed, and make it behave like this by default.
31 update_step, bot_db = api.chromium_tests.prepare_checkout(bot_config) 31 update_step, bot_db = api.chromium_tests.prepare_checkout(bot_config)
32 api.auto_bisect.start_try_job(api, update_step=update_step, bot_db=bot_db, 32 api.auto_bisect.start_try_job(api, update_step=update_step, bot_db=bot_db,
33 do_not_nest_wait_for_revision=True) 33 do_not_nest_wait_for_revision=True)
34 34
35 35
36 def GenTests(api): 36 def GenTests(api):
37 yield (api.test('basic') + api.properties.tryserver( 37 yield (api.test('basic') + api.properties.tryserver(
38 path_config='kitchen',
38 mastername='tryserver.chromium.perf', 39 mastername='tryserver.chromium.perf',
39 buildername='linux_perf_bisect') + api.override_step_data( 40 buildername='linux_perf_bisect') + api.override_step_data(
40 'git diff to analyze patch', 41 'git diff to analyze patch',
41 api.raw_io.stream_output('tools/auto_bisect/bisect.cfg'))) 42 api.raw_io.stream_output('tools/auto_bisect/bisect.cfg')))
42 43
43 config_json = { 44 config_json = {
44 'command': './tools/perf/run_benchmark -v --browser=release sunspider', 45 'command': './tools/perf/run_benchmark -v --browser=release sunspider',
45 'max_time_minutes': '25', 46 'max_time_minutes': '25',
46 'repeat_count': '1', 47 'repeat_count': '1',
47 'truncate_percent': '25', 48 'truncate_percent': '25',
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 "result": "SUCCESS", 95 "result": "SUCCESS",
95 "status": "COMPLETED", 96 "status": "COMPLETED",
96 "status_changed_utc": "Mon Jun 13 19:32:37 2016", 97 "status_changed_utc": "Mon Jun 13 19:32:37 2016",
97 "updated_utc": "Mon Jun 13 19:32:37 2016", 98 "updated_utc": "Mon Jun 13 19:32:37 2016",
98 "url": "http://build.chromium.org/p/tryserver.chromium.perf/builders/linux _perf_bisect/builds/6537", 99 "url": "http://build.chromium.org/p/tryserver.chromium.perf/builders/linux _perf_bisect/builds/6537",
99 "utcnow_utc": "Tue Jun 21 21:33:56 2016" 100 "utcnow_utc": "Tue Jun 21 21:33:56 2016"
100 } 101 }
101 } 102 }
102 103
103 yield (api.test('basic_perf_tryjob') + api.properties.tryserver( 104 yield (api.test('basic_perf_tryjob') + api.properties.tryserver(
105 path_config='kitchen',
104 mastername='tryserver.chromium.perf', 106 mastername='tryserver.chromium.perf',
105 buildername='linux_perf_bisect', 107 buildername='linux_perf_bisect',
106 patch_storage='rietveld', 108 patch_storage='rietveld',
107 patchset='20001', 109 patchset='20001',
108 issue='12345', 110 issue='12345',
109 is_test=True, 111 is_test=True,
110 rietveld="https://codereview.chromium.org") + api.override_step_data( 112 rietveld="https://codereview.chromium.org") + api.override_step_data(
111 'git diff to analyze patch', 113 'git diff to analyze patch',
112 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 114 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
113 api.override_step_data('load config', api.json.output(config_json)) + 115 api.override_step_data('load config', api.json.output(config_json)) +
114 api.step_data('gsutil exists', retcode=1) + 116 api.step_data('gsutil exists', retcode=1) +
115 api.step_data('buildbucket.put', 117 api.step_data('buildbucket.put',
116 stdout=api.json.output(buildbucket_put_response)) + 118 stdout=api.json.output(buildbucket_put_response)) +
117 api.step_data('buildbucket.put (2)', 119 api.step_data('buildbucket.put (2)',
118 stdout=api.json.output(buildbucket_put_response)) + 120 stdout=api.json.output(buildbucket_put_response)) +
119 api.step_data('buildbucket.get', 121 api.step_data('buildbucket.get',
120 stdout=api.json.output(buildbucket_get_response)) + 122 stdout=api.json.output(buildbucket_get_response)) +
121 api.step_data('buildbucket.get (2)', 123 api.step_data('buildbucket.get (2)',
122 stdout=api.json.output(buildbucket_get_response)) + 124 stdout=api.json.output(buildbucket_get_response)) +
123 api.step_data('Performance Test (Without Patch) 1 of 1', 125 api.step_data('Performance Test (Without Patch) 1 of 1',
124 stdout=api.raw_io.output(str(results_without_patch))) + 126 stdout=api.raw_io.output(str(results_without_patch))) +
125 api.step_data('Performance Test (With Patch) 1 of 1', 127 api.step_data('Performance Test (With Patch) 1 of 1',
126 stdout=api.raw_io.output(str(results_with_patch))) + 128 stdout=api.raw_io.output(str(results_with_patch))) +
127 api.step_data('Post bisect results', 129 api.step_data('Post bisect results',
128 stdout=api.json.output({'status_code': 200}))) 130 stdout=api.json.output({'status_code': 200})))
129 131
130 config_json.update({'metric': 'dummy/dummy'}) 132 config_json.update({'metric': 'dummy/dummy'})
131 133
132 yield (api.test('basic_perf_tryjob_with_metric') + api.properties.tryserver( 134 yield (api.test('basic_perf_tryjob_with_metric') + api.properties.tryserver(
135 path_config='kitchen',
133 mastername='tryserver.chromium.perf', 136 mastername='tryserver.chromium.perf',
134 buildername='linux_perf_bisect', 137 buildername='linux_perf_bisect',
135 patch_storage='rietveld', 138 patch_storage='rietveld',
136 patchset='20001', 139 patchset='20001',
137 issue='12345', 140 issue='12345',
138 is_test=True, 141 is_test=True,
139 rietveld="https://codereview.chromium.org") + api.override_step_data( 142 rietveld="https://codereview.chromium.org") + api.override_step_data(
140 'git diff to analyze patch', 143 'git diff to analyze patch',
141 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 144 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
142 api.override_step_data('load config', api.json.output(config_json)) + 145 api.override_step_data('load config', api.json.output(config_json)) +
143 api.step_data('gsutil exists', retcode=1) + 146 api.step_data('gsutil exists', retcode=1) +
144 api.step_data('buildbucket.put', 147 api.step_data('buildbucket.put',
145 stdout=api.json.output(buildbucket_put_response)) + 148 stdout=api.json.output(buildbucket_put_response)) +
146 api.step_data('buildbucket.put (2)', 149 api.step_data('buildbucket.put (2)',
147 stdout=api.json.output(buildbucket_put_response)) + 150 stdout=api.json.output(buildbucket_put_response)) +
148 api.step_data('buildbucket.get', 151 api.step_data('buildbucket.get',
149 stdout=api.json.output(buildbucket_get_response)) + 152 stdout=api.json.output(buildbucket_get_response)) +
150 api.step_data('buildbucket.get (2)', 153 api.step_data('buildbucket.get (2)',
151 stdout=api.json.output(buildbucket_get_response)) + 154 stdout=api.json.output(buildbucket_get_response)) +
152 api.step_data('Performance Test (Without Patch) 1 of 1', 155 api.step_data('Performance Test (Without Patch) 1 of 1',
153 stdout=api.raw_io.output(results_without_patch)) + 156 stdout=api.raw_io.output(results_without_patch)) +
154 api.step_data('Performance Test (With Patch) 1 of 1', 157 api.step_data('Performance Test (With Patch) 1 of 1',
155 stdout=api.raw_io.output(results_with_patch)) + 158 stdout=api.raw_io.output(results_with_patch)) +
156 api.step_data('Post bisect results', 159 api.step_data('Post bisect results',
157 stdout=api.json.output({'status_code': 200}))) 160 stdout=api.json.output({'status_code': 200})))
158 161
159 162
160 yield (api.test('perf_tryjob_failed_test') + api.properties.tryserver( 163 yield (api.test('perf_tryjob_failed_test') + api.properties.tryserver(
164 path_config='kitchen',
161 mastername='tryserver.chromium.perf', 165 mastername='tryserver.chromium.perf',
162 buildername='linux_perf_bisect', 166 buildername='linux_perf_bisect',
163 patch_storage='rietveld', 167 patch_storage='rietveld',
164 patchset='20001', 168 patchset='20001',
165 issue='12345', 169 issue='12345',
166 is_test=True, 170 is_test=True,
167 rietveld="https://codereview.chromium.org") + api.override_step_data( 171 rietveld="https://codereview.chromium.org") + api.override_step_data(
168 'git diff to analyze patch', 172 'git diff to analyze patch',
169 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 173 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
170 api.override_step_data('load config', api.json.output(config_json)) + 174 api.override_step_data('load config', api.json.output(config_json)) +
171 api.step_data('gsutil exists', retcode=1) + 175 api.step_data('gsutil exists', retcode=1) +
172 api.step_data('buildbucket.put', 176 api.step_data('buildbucket.put',
173 stdout=api.json.output(buildbucket_put_response)) + 177 stdout=api.json.output(buildbucket_put_response)) +
174 api.step_data('buildbucket.put (2)', 178 api.step_data('buildbucket.put (2)',
175 stdout=api.json.output(buildbucket_put_response)) + 179 stdout=api.json.output(buildbucket_put_response)) +
176 api.step_data('buildbucket.get', 180 api.step_data('buildbucket.get',
177 stdout=api.json.output(buildbucket_get_response)) + 181 stdout=api.json.output(buildbucket_get_response)) +
178 api.step_data('buildbucket.get (2)', 182 api.step_data('buildbucket.get (2)',
179 stdout=api.json.output(buildbucket_get_response)) + 183 stdout=api.json.output(buildbucket_get_response)) +
180 api.step_data('Performance Test (With Patch) 1 of 1', 184 api.step_data('Performance Test (With Patch) 1 of 1',
181 retcode=1)) 185 retcode=1))
182 186
183 config_json.update({'good_revision': '306475', 'bad_revision': '306476'}) 187 config_json.update({'good_revision': '306475', 'bad_revision': '306476'})
184 188
185 yield ( 189 yield (
186 api.test('basic_perf_tryjob_with_revisions') + api.properties.tryserver( 190 api.test('basic_perf_tryjob_with_revisions') + api.properties.tryserver(
191 path_config='kitchen',
187 mastername='tryserver.chromium.perf', 192 mastername='tryserver.chromium.perf',
188 buildername='linux_perf_bisect', 193 buildername='linux_perf_bisect',
189 patch_storage='rietveld', 194 patch_storage='rietveld',
190 patchset='20001', 195 patchset='20001',
191 issue='12345', 196 issue='12345',
192 is_test=True, 197 is_test=True,
193 rietveld="https://codereview.chromium.org") + api.override_step_data( 198 rietveld="https://codereview.chromium.org") + api.override_step_data(
194 'git diff to analyze patch', 199 'git diff to analyze patch',
195 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 200 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
196 api.override_step_data('load config', api.json.output(config_json)) + 201 api.override_step_data('load config', api.json.output(config_json)) +
(...skipping 19 matching lines...) Expand all
216 stdout=api.json.output({'status_code': 200}))) 221 stdout=api.json.output({'status_code': 200})))
217 222
218 config_json = { 223 config_json = {
219 'max_time_minutes': '25', 224 'max_time_minutes': '25',
220 'repeat_count': '1', 225 'repeat_count': '1',
221 'truncate_percent': '25', 226 'truncate_percent': '25',
222 'target_arch': 'ia32', 227 'target_arch': 'ia32',
223 } 228 }
224 229
225 yield (api.test('perf_tryjob_config_error') + api.properties.tryserver( 230 yield (api.test('perf_tryjob_config_error') + api.properties.tryserver(
231 path_config='kitchen',
226 mastername='tryserver.chromium.perf', 232 mastername='tryserver.chromium.perf',
227 buildername='linux_perf_bisect') + api.properties( 233 buildername='linux_perf_bisect') + api.properties(
228 requester='abcdxyz@chromium.org') + api.override_step_data( 234 requester='abcdxyz@chromium.org') + api.override_step_data(
229 'git diff to analyze patch', 235 'git diff to analyze patch',
230 api.raw_io.stream_output('tools/run-perf-test.cfg')) + 236 api.raw_io.stream_output('tools/run-perf-test.cfg')) +
231 api.override_step_data('load config', api.json.output(config_json))) 237 api.override_step_data('load config', api.json.output(config_json)))
232 238
233 yield (api.test('perf_cq_run_benchmark') + 239 yield (api.test('perf_cq_run_benchmark') +
234 api.properties.tryserver( 240 api.properties.tryserver(
241 path_config='kitchen',
235 mastername='tryserver.chromium.perf', 242 mastername='tryserver.chromium.perf',
236 buildername='linux_perf_bisect', 243 buildername='linux_perf_bisect',
237 patch_storage='rietveld', 244 patch_storage='rietveld',
238 patchset='20001', 245 patchset='20001',
239 issue='12345', 246 issue='12345',
240 is_test=True, 247 is_test=True,
241 rietveld="https://codereview.chromium.org") + 248 rietveld="https://codereview.chromium.org") +
242 api.properties(requester='commit-bot@chromium.org') + 249 api.properties(requester='commit-bot@chromium.org') +
243 api.override_step_data( 250 api.override_step_data(
244 'git diff to analyze patch', 251 'git diff to analyze patch',
245 api.raw_io.stream_output('tools/perf/benchmarks/blink_perf.py')) + 252 api.raw_io.stream_output('tools/perf/benchmarks/blink_perf.py')) +
246 api.step_data('buildbucket.put', 253 api.step_data('buildbucket.put',
247 stdout=api.json.output(buildbucket_put_response)) + 254 stdout=api.json.output(buildbucket_put_response)) +
248 api.step_data('buildbucket.get', 255 api.step_data('buildbucket.get',
249 stdout=api.json.output(buildbucket_get_response))) 256 stdout=api.json.output(buildbucket_get_response)))
250 257
251 yield (api.test('perf_cq_no_changes') + 258 yield (api.test('perf_cq_no_changes') +
252 api.properties.tryserver( 259 api.properties.tryserver(
260 path_config='kitchen',
253 mastername='tryserver.chromium.perf', 261 mastername='tryserver.chromium.perf',
254 buildername='linux_perf_bisect', 262 buildername='linux_perf_bisect',
255 patch_storage='rietveld', 263 patch_storage='rietveld',
256 patchset='20001', 264 patchset='20001',
257 issue='12345', 265 issue='12345',
258 is_test=True, 266 is_test=True,
259 rietveld="https://codereview.chromium.org") + 267 rietveld="https://codereview.chromium.org") +
260 api.properties(requester='commit-bot@chromium.org') + 268 api.properties(requester='commit-bot@chromium.org') +
261 api.override_step_data( 269 api.override_step_data(
262 'git diff to analyze patch', 270 'git diff to analyze patch',
263 api.raw_io.stream_output('tools/no_benchmark_file'))) 271 api.raw_io.stream_output('tools/no_benchmark_file')))
264 272
265 yield (api.test('perf_cq_no_benchmark_to_run') + 273 yield (api.test('perf_cq_no_benchmark_to_run') +
266 api.properties.tryserver( 274 api.properties.tryserver(
275 path_config='kitchen',
267 mastername='tryserver.chromium.perf', 276 mastername='tryserver.chromium.perf',
268 buildername='linux_perf_bisect', 277 buildername='linux_perf_bisect',
269 patch_storage='rietveld', 278 patch_storage='rietveld',
270 patchset='20001', 279 patchset='20001',
271 issue='12345', 280 issue='12345',
272 is_test=True, 281 is_test=True,
273 rietveld="https://codereview.chromium.org") + 282 rietveld="https://codereview.chromium.org") +
274 api.properties(requester='commit-bot@chromium.org') + 283 api.properties(requester='commit-bot@chromium.org') +
275 api.override_step_data( 284 api.override_step_data(
276 'git diff to analyze patch', 285 'git diff to analyze patch',
(...skipping 11 matching lines...) Expand all
288 'repeat_count': '2', 297 'repeat_count': '2',
289 'max_time_minutes': '5', 298 'max_time_minutes': '5',
290 'truncate_percent': '25', 299 'truncate_percent': '25',
291 'bug_id': '425582', 300 'bug_id': '425582',
292 'gs_bucket': 'chrome-perf', 301 'gs_bucket': 'chrome-perf',
293 'builder_host': 'master4.golo.chromium.org', 302 'builder_host': 'master4.golo.chromium.org',
294 'builder_port': '8341', 303 'builder_port': '8341',
295 } 304 }
296 yield ( 305 yield (
297 api.test('basic_linux_bisect_tester_recipe') + api.properties.tryserver( 306 api.test('basic_linux_bisect_tester_recipe') + api.properties.tryserver(
307 path_config='kitchen',
298 mastername='tryserver.chromium.perf', 308 mastername='tryserver.chromium.perf',
299 buildername='linux_perf_bisect') + api.step_data( 309 buildername='linux_perf_bisect') + api.step_data(
300 'saving url to temp file', 310 'saving url to temp file',
301 stdout=api.raw_io.output('/tmp/dummy1')) + api.step_data( 311 stdout=api.raw_io.output('/tmp/dummy1')) + api.step_data(
302 'saving json to temp file', 312 'saving json to temp file',
303 stdout=api.raw_io.output('/tmp/dummy2')) + api.properties( 313 stdout=api.raw_io.output('/tmp/dummy2')) + api.properties(
304 bisect_config=bisect_config) + api.properties( 314 bisect_config=bisect_config) + api.properties(
305 job_name='f7a7b4135624439cbd27fdd5133d74ec') + 315 job_name='f7a7b4135624439cbd27fdd5133d74ec') +
306 api.bisect_tester(tempfile='/tmp/dummy') + api.properties( 316 api.bisect_tester(tempfile='/tmp/dummy') + api.properties(
307 parent_got_revision='1111111') + api.properties( 317 parent_got_revision='1111111') + api.properties(
308 parent_build_archive_url='gs://test-domain/test-archive.zip')) 318 parent_build_archive_url='gs://test-domain/test-archive.zip'))
309 319
310 bisect_ret_code_config = { 320 bisect_ret_code_config = {
311 'test_type': 'return_code', 321 'test_type': 'return_code',
312 'command': './tools/perf/run_benchmark -v ' 322 'command': './tools/perf/run_benchmark -v '
313 '--browser=release page_cycler.intl_ar_fa_he', 323 '--browser=release page_cycler.intl_ar_fa_he',
314 'metric': 'warm_times/page_load_time', 324 'metric': 'warm_times/page_load_time',
315 'repeat_count': '2', 325 'repeat_count': '2',
316 'max_time_minutes': '5', 326 'max_time_minutes': '5',
317 'truncate_percent': '25', 327 'truncate_percent': '25',
318 'bug_id': '425582', 328 'bug_id': '425582',
319 'gs_bucket': 'chrome-perf', 329 'gs_bucket': 'chrome-perf',
320 'builder_host': 'master4.golo.chromium.org', 330 'builder_host': 'master4.golo.chromium.org',
321 'builder_port': '8341', 331 'builder_port': '8341',
322 } 332 }
323 yield (api.test('basic_linux_bisect_tester_recipe_ret_code') + 333 yield (api.test('basic_linux_bisect_tester_recipe_ret_code') +
324 api.properties.tryserver(mastername='tryserver.chromium.perf', 334 api.properties.tryserver(path_config='kitchen',
335 mastername='tryserver.chromium.perf',
325 buildername='linux_perf_bisect') + 336 buildername='linux_perf_bisect') +
326 api.step_data('saving url to temp file', 337 api.step_data('saving url to temp file',
327 stdout=api.raw_io.output('/tmp/dummy1')) + api.step_data( 338 stdout=api.raw_io.output('/tmp/dummy1')) + api.step_data(
328 'saving json to temp file', 339 'saving json to temp file',
329 stdout=api.raw_io.output('/tmp/dummy2')) + 340 stdout=api.raw_io.output('/tmp/dummy2')) +
330 api.properties(bisect_config=bisect_ret_code_config) + api.properties( 341 api.properties(bisect_config=bisect_ret_code_config) + api.properties(
331 job_name='f7a7b4135624439cbd27fdd5133d74ec') + 342 job_name='f7a7b4135624439cbd27fdd5133d74ec') +
332 api.bisect_tester(tempfile='/tmp/dummy') + api.properties( 343 api.bisect_tester(tempfile='/tmp/dummy') + api.properties(
333 parent_got_revision='1111111') + api.properties( 344 parent_got_revision='1111111') + api.properties(
334 parent_build_archive_url='gs://test-domain/test-archive.zip')) 345 parent_build_archive_url='gs://test-domain/test-archive.zip'))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698