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

Side by Side Diff: scripts/slave/recipes/bisect.py

Issue 2282563004: Do not exclude the last revision in the range returned by gitiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: typo 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 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 import base64 5 import base64
6 import collections 6 import collections
7 import json 7 import json
8 8
9 DEPS = [ 9 DEPS = [
10 'auto_bisect', 10 'auto_bisect',
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 return_code_test += _get_revision_range_step_data(api, return_code_test_data) 245 return_code_test += _get_revision_range_step_data(api, return_code_test_data)
246 return_code_test += _get_post_bisect_step_data(api) 246 return_code_test += _get_post_bisect_step_data(api)
247 yield return_code_test 247 yield return_code_test
248 248
249 249
250 def _get_revision_range_step_data(api, range_data): 250 def _get_revision_range_step_data(api, range_data):
251 """Gives canned output for fetch_intervening_revisions.py.""" 251 """Gives canned output for fetch_intervening_revisions.py."""
252 range_data.sort(key=lambda r: r['commit_pos']) 252 range_data.sort(key=lambda r: r['commit_pos'])
253 min_rev = range_data[0]['hash'] 253 min_rev = range_data[0]['hash']
254 max_rev = range_data[-1]['hash'] 254 max_rev = range_data[-1]['hash']
255 output = [[r['hash'], 'ignored'] for r in range_data[1:-1]] 255 output = [[r['hash'], 'ignored'] for r in range_data[1:]]
256 step_name = ('Expanding revision range.for revisions %s:%s' % 256 step_name = ('Expanding revision range.for revisions %s:%s' %
257 (min_rev, max_rev)) 257 (min_rev, max_rev))
258 return api.step_data(step_name, stdout=api.json.output(output)) 258 return api.step_data(step_name, stdout=api.json.output(output))
259 259
260 260
261 def _get_step_data_for_revision(api, revision_data, skip_results=False): 261 def _get_step_data_for_revision(api, revision_data, skip_results=False):
262 """Generator that produces step patches for fake results.""" 262 """Generator that produces step patches for fake results."""
263 commit_pos_number = revision_data['commit_pos'] 263 commit_pos_number = revision_data['commit_pos']
264 commit_hash = revision_data['hash'] 264 commit_hash = revision_data['hash']
265 test_results = revision_data['test_results'] 265 test_results = revision_data['test_results']
(...skipping 21 matching lines...) Expand all
287 step_name = 'Reading culprit cl information.' 287 step_name = 'Reading culprit cl information.'
288 stdout = api.json.output(revision_data['cl_info']) 288 stdout = api.json.output(revision_data['cl_info'])
289 yield api.step_data(step_name, stdout=stdout) 289 yield api.step_data(step_name, stdout=stdout)
290 290
291 291
292 def _get_post_bisect_step_data(api, parent_step=''): 292 def _get_post_bisect_step_data(api, parent_step=''):
293 """Gets step data for perf_dashboard/resource/post_json.py.""" 293 """Gets step data for perf_dashboard/resource/post_json.py."""
294 response = {'status_code': 200} 294 response = {'status_code': 200}
295 return api.step_data(parent_step + 'Post bisect results', 295 return api.step_data(parent_step + 'Post bisect results',
296 stdout=api.json.output(response)) 296 stdout=api.json.output(response))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698