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

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: 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 # Pass in a current working directory inside of the repo so 90 # Pass in a current working directory inside of the repo so
91 # that this command can be called from outside of the repo. 91 # that this command can be called from outside of the repo.
92 return Git(cwd=self._tool.filesystem.dirname(self._tool.path())) 92 return Git(cwd=self._tool.filesystem.dirname(self._tool.path()))
93 93
94 def trigger_jobs_for_missing_builds(self, builds): 94 def trigger_jobs_for_missing_builds(self, builds):
95 builders_with_builds = {b.builder_name for b in builds} 95 builders_with_builds = {b.builder_name for b in builds}
96 builders_without_builds = set(self._try_bots()) - builders_with_builds 96 builders_without_builds = set(self._try_bots()) - builders_with_builds
97 if not builders_without_builds: 97 if not builders_without_builds:
98 return 98 return
99 _log.info('Triggering try jobs for: %s', ', '.join(sorted(builders_witho ut_builds))) 99 _log.info('Triggering try jobs for: %s', ', '.join(sorted(builders_witho ut_builds)))
100 # If the builders may be under different masters, then they cannot
101 # all be started in one invocation of git cl try without providing
102 # master names. Doing separate invocations is slower, but always works
103 # even when there are builders under different master names.
100 git_cl = GitCL(self._tool.executive) 104 git_cl = GitCL(self._tool.executive)
101 command = ['try']
102 for builder in sorted(builders_without_builds): 105 for builder in sorted(builders_without_builds):
103 command += ['-b', builder] 106 _log.info(git_cl.run(['try', '-b', builder]))
wkorman 2016/08/23 23:30:46 remove log wrapper, looks like debugging?
qyearsley 2016/08/24 18:17:44 I originally intended for this to provide more out
104 git_cl.run(command)
105 107
106 def _test_prefix_list(self, issue_number, only_changed_tests): 108 def _test_prefix_list(self, issue_number, only_changed_tests):
107 """Returns a collection of test, builder and file extensions to get new baselines for. 109 """Returns a collection of test, builder and file extensions to get new baselines for.
108 110
109 Args: 111 Args:
110 issue_number: The CL number of the change which needs new baselines. 112 issue_number: The CL number of the change which needs new baselines.
111 only_changed_tests: Whether to only include baselines for tests that 113 only_changed_tests: Whether to only include baselines for tests that
112 are changed in this CL. If False, all new baselines for failing 114 are changed in this CL. If False, all new baselines for failing
113 tests will be downloaded, even for tests that were not modified. 115 tests will be downloaded, even for tests that were not modified.
114 116
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 @staticmethod 162 @staticmethod
161 def _log_test_prefix_list(test_prefix_list): 163 def _log_test_prefix_list(test_prefix_list):
162 """Logs the tests to download new baselines for.""" 164 """Logs the tests to download new baselines for."""
163 if not test_prefix_list: 165 if not test_prefix_list:
164 _log.info('No tests to rebaseline.') 166 _log.info('No tests to rebaseline.')
165 return 167 return
166 _log.info('Tests to rebaseline:') 168 _log.info('Tests to rebaseline:')
167 for test, builds in test_prefix_list.iteritems(): 169 for test, builds in test_prefix_list.iteritems():
168 builds_str = ', '.join(sorted('%s (%s)' % (b.builder_name, b.build_n umber) for b in builds)) 170 builds_str = ', '.join(sorted('%s (%s)' % (b.builder_name, b.build_n umber) for b in builds))
169 _log.info(' %s: %s', test, builds_str) 171 _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