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

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

Issue 2452113002: rebaseline-cl: trigger all try jobs in one invocation of git cl try. (Closed)
Patch Set: Created 4 years, 1 month 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_cl_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 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 """A command to fetch new baselines from try jobs for a Rietveld issue. 5 """A command to fetch new baselines from try jobs for a Rietveld issue.
6 6
7 This command interacts with the Rietveld API to get information about try jobs 7 This command interacts with the Rietveld API to get information about try jobs
8 with layout test results. 8 with layout test results.
9 """ 9 """
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 builders_without_builds = set(self._try_bots()) - builders_with_builds 125 builders_without_builds = set(self._try_bots()) - builders_with_builds
126 builders_with_pending_builds = {b.builder_name for b in builds if b.buil d_number is None} 126 builders_with_pending_builds = {b.builder_name for b in builds if b.buil d_number is None}
127 127
128 if builders_with_pending_builds: 128 if builders_with_pending_builds:
129 _log.info('There are existing pending builds for:') 129 _log.info('There are existing pending builds for:')
130 for builder in sorted(builders_with_pending_builds): 130 for builder in sorted(builders_with_pending_builds):
131 _log.info(' %s', builder) 131 _log.info(' %s', builder)
132 132
133 if builders_without_builds: 133 if builders_without_builds:
134 _log.info('Triggering try jobs for:') 134 _log.info('Triggering try jobs for:')
135 command = ['try']
135 for builder in sorted(builders_without_builds): 136 for builder in sorted(builders_without_builds):
136 _log.info(' %s', builder) 137 _log.info(' %s', builder)
137 # If the builders may be under different masters, then they cannot 138 command.extend(['-b', builder])
138 # all be started in one invocation of git cl try without providing 139 self.git_cl().run(command)
139 # master names. Doing separate invocations is slower, but always wor ks
140 # even when there are builders under different master names.
141 for builder in sorted(builders_without_builds):
142 self.git_cl().run(['try', '-b', builder])
143 140
144 return bool(builders_with_pending_builds or builders_without_builds) 141 return bool(builders_with_pending_builds or builders_without_builds)
145 142
146 def _test_prefix_list(self, issue_number, only_changed_tests): 143 def _test_prefix_list(self, issue_number, only_changed_tests):
147 """Returns a collection of test, builder and file extensions to get new baselines for. 144 """Returns a collection of test, builder and file extensions to get new baselines for.
148 145
149 Args: 146 Args:
150 issue_number: The CL number of the change which needs new baselines. 147 issue_number: The CL number of the change which needs new baselines.
151 only_changed_tests: Whether to only include baselines for tests that 148 only_changed_tests: Whether to only include baselines for tests that
152 are changed in this CL. If False, all new baselines for failing 149 are changed in this CL. If False, all new baselines for failing
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 @staticmethod 194 @staticmethod
198 def _log_test_prefix_list(test_prefix_list): 195 def _log_test_prefix_list(test_prefix_list):
199 """Logs the tests to download new baselines for.""" 196 """Logs the tests to download new baselines for."""
200 if not test_prefix_list: 197 if not test_prefix_list:
201 _log.info('No tests to rebaseline; exiting.') 198 _log.info('No tests to rebaseline; exiting.')
202 return 199 return
203 _log.info('Tests to rebaseline:') 200 _log.info('Tests to rebaseline:')
204 for test, builds in test_prefix_list.iteritems(): 201 for test, builds in test_prefix_list.iteritems():
205 builds_str = ', '.join(sorted('%s (%s)' % (b.builder_name, b.build_n umber) for b in builds)) 202 builds_str = ', '.join(sorted('%s (%s)' % (b.builder_name, b.build_n umber) for b in builds))
206 _log.info(' %s: %s', test, builds_str) 203 _log.info(' %s: %s', test, builds_str)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698