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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 2129323002: Remove self._builder_data from Rebaseline classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 Google Inc. All rights reserved. 1 # Copyright (c) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 self._add_to_scm_later(path) 278 self._add_to_scm_later(path)
279 self._print_scm_changes() 279 self._print_scm_changes()
280 280
281 281
282 class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand): 282 class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand):
283 """Base class for rebaseline commands that do some tasks in parallel.""" 283 """Base class for rebaseline commands that do some tasks in parallel."""
284 # Not overriding execute() - pylint: disable=abstract-method 284 # Not overriding execute() - pylint: disable=abstract-method
285 285
286 def __init__(self, options=None): 286 def __init__(self, options=None):
287 super(AbstractParallelRebaselineCommand, self).__init__(options=options) 287 super(AbstractParallelRebaselineCommand, self).__init__(options=options)
288 self._builder_data = {}
289 288
289 @memoized
290 def builder_data(self): 290 def builder_data(self):
291 if not self._builder_data: 291 builder_to_results = {}
292 for builder_name in self._release_builders(): 292 for builder_name in self._release_builders():
293 builder = self._tool.buildbot.builder_with_name(builder_name) 293 builder = self._tool.buildbot.builder_with_name(builder_name)
294 builder_results = builder.latest_layout_test_results() 294 builder_results = builder.latest_layout_test_results()
295 if builder_results: 295 if builder_results:
296 self._builder_data[builder_name] = builder_results 296 builder_to_results[builder_name] = builder_results
297 else: 297 else:
298 raise Exception("No result for builder %s." % builder_name) 298 raise Exception("No result for builder %s." % builder_name)
299 return self._builder_data 299 return builder_to_results
300 300
301 # The release builders cycle much faster than the debug ones and cover all t he platforms. 301 # The release builders cycle much faster than the debug ones and cover all t he platforms.
302 def _release_builders(self): 302 def _release_builders(self):
303 release_builders = [] 303 release_builders = []
304 for builder_name in self._tool.builders.all_continuous_builder_names(): 304 for builder_name in self._tool.builders.all_continuous_builder_names():
305 if 'ASAN' in builder_name: 305 if 'ASAN' in builder_name:
306 continue 306 continue
307 port = self._tool.port_factory.get_from_builder_name(builder_name) 307 port = self._tool.port_factory.get_from_builder_name(builder_name)
308 if port.test_configuration().build_type == 'release': 308 if port.test_configuration().build_type == 'release':
309 release_builders.append(builder_name) 309 release_builders.append(builder_name)
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 issue_already_closed = tool.executive.run_command( 915 issue_already_closed = tool.executive.run_command(
916 ['git', 'config', 'branch.%s.rietveldissue' % rebaseline _branch_name], 916 ['git', 'config', 'branch.%s.rietveldissue' % rebaseline _branch_name],
917 return_exit_code=True) 917 return_exit_code=True)
918 if not issue_already_closed: 918 if not issue_already_closed:
919 self._run_git_cl_command(options, ['set_close']) 919 self._run_git_cl_command(options, ['set_close'])
920 920
921 tool.scm().ensure_cleanly_tracking_remote_master() 921 tool.scm().ensure_cleanly_tracking_remote_master()
922 if old_branch_name_or_ref: 922 if old_branch_name_or_ref:
923 tool.scm().checkout_branch(old_branch_name_or_ref) 923 tool.scm().checkout_branch(old_branch_name_or_ref)
924 tool.scm().delete_branch(rebaseline_branch_name) 924 tool.scm().delete_branch(rebaseline_branch_name)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698