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

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

Issue 2269253002: In rebaseline-cl, trigger try jobs with builder per invocation of git cl try. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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
« no previous file with comments | « no previous file | no next file » | 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 def trigger_jobs_for_missing_builds(self, builds): 98 def trigger_jobs_for_missing_builds(self, builds):
99 builders_with_builds = {b.builder_name for b in builds} 99 builders_with_builds = {b.builder_name for b in builds}
100 builders_without_builds = set(self._try_bots()) - builders_with_builds 100 builders_without_builds = set(self._try_bots()) - builders_with_builds
101 if not builders_without_builds: 101 if not builders_without_builds:
102 return 102 return
103 103
104 _log.info('Triggering try jobs for:') 104 _log.info('Triggering try jobs for:')
105 for builder in sorted(builders_without_builds): 105 for builder in sorted(builders_without_builds):
106 _log.info(' %s', builder) 106 _log.info(' %s', builder)
107 107
108 git_cl = GitCL(self._tool.executive) 108 # If the builders may be under different masters, then they cannot
109 command = ['try'] 109 # all be started in one invocation of git cl try without providing
110 # master names. Doing separate invocations is slower, but always works
111 # even when there are builders under different master names.
110 for builder in sorted(builders_without_builds): 112 for builder in sorted(builders_without_builds):
111 command += ['-b', builder] 113 self.git_cl().run(['try', '-b', builder])
112 self.git_cl().run(command)
113 114
114 def _test_prefix_list(self, issue_number, only_changed_tests): 115 def _test_prefix_list(self, issue_number, only_changed_tests):
115 """Returns a collection of test, builder and file extensions to get new baselines for. 116 """Returns a collection of test, builder and file extensions to get new baselines for.
116 117
117 Args: 118 Args:
118 issue_number: The CL number of the change which needs new baselines. 119 issue_number: The CL number of the change which needs new baselines.
119 only_changed_tests: Whether to only include baselines for tests that 120 only_changed_tests: Whether to only include baselines for tests that
120 are changed in this CL. If False, all new baselines for failing 121 are changed in this CL. If False, all new baselines for failing
121 tests will be downloaded, even for tests that were not modified. 122 tests will be downloaded, even for tests that were not modified.
122 123
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 @staticmethod 169 @staticmethod
169 def _log_test_prefix_list(test_prefix_list): 170 def _log_test_prefix_list(test_prefix_list):
170 """Logs the tests to download new baselines for.""" 171 """Logs the tests to download new baselines for."""
171 if not test_prefix_list: 172 if not test_prefix_list:
172 _log.info('No tests to rebaseline; exiting.') 173 _log.info('No tests to rebaseline; exiting.')
173 return 174 return
174 _log.info('Tests to rebaseline:') 175 _log.info('Tests to rebaseline:')
175 for test, builds in test_prefix_list.iteritems(): 176 for test, builds in test_prefix_list.iteritems():
176 builds_str = ', '.join(sorted('%s (%s)' % (b.builder_name, b.build_n umber) for b in builds)) 177 builds_str = ', '.join(sorted('%s (%s)' % (b.builder_name, b.build_n umber) for b in builds))
177 _log.info(' %s: %s', test, builds_str) 178 _log.info(' %s: %s', test, builds_str)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698