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

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

Issue 2396433004: Reland of "update SCM and expectations all at once after all commands". (Closed)
Patch Set: Add file to list of files to rm from SCM even if it doesn't exist in SCM. Created 4 years, 2 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 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 # TODO(qyearsley): Fix places where non-existing tests may be added: 77 # TODO(qyearsley): Fix places where non-existing tests may be added:
78 # 1. Make sure that the tests obtained when passing --only-changed-test s include only existing tests. 78 # 1. Make sure that the tests obtained when passing --only-changed-test s include only existing tests.
79 # 2. Make sure that update-w3c-test-expectations doesn't specify non-ex isting tests (http://crbug.com/649691). 79 # 2. Make sure that update-w3c-test-expectations doesn't specify non-ex isting tests (http://crbug.com/649691).
80 test_prefix_list = self._filter_existing(test_prefix_list) 80 test_prefix_list = self._filter_existing(test_prefix_list)
81 81
82 self._log_test_prefix_list(test_prefix_list) 82 self._log_test_prefix_list(test_prefix_list)
83 83
84 if options.dry_run: 84 if options.dry_run:
85 return 85 return
86 self._rebaseline(options, test_prefix_list, update_scm=False) 86 self._rebaseline(options, test_prefix_list)
87 87
88 def _filter_existing(self, test_prefix_list): 88 def _filter_existing(self, test_prefix_list):
89 """Filters out entries in |test_prefix_list| for tests that don't exist. """ 89 """Filters out entries in |test_prefix_list| for tests that don't exist. """
90 new_test_prefix_list = {} 90 new_test_prefix_list = {}
91 port = self._tool.port_factory.get() 91 port = self._tool.port_factory.get()
92 for test in test_prefix_list: 92 for test in test_prefix_list:
93 path = port.abspath_for_test(test) 93 path = port.abspath_for_test(test)
94 if self._tool.filesystem.exists(path): 94 if self._tool.filesystem.exists(path):
95 new_test_prefix_list[test] = test_prefix_list[test] 95 new_test_prefix_list[test] = test_prefix_list[test]
96 else: 96 else:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 @staticmethod 188 @staticmethod
189 def _log_test_prefix_list(test_prefix_list): 189 def _log_test_prefix_list(test_prefix_list):
190 """Logs the tests to download new baselines for.""" 190 """Logs the tests to download new baselines for."""
191 if not test_prefix_list: 191 if not test_prefix_list:
192 _log.info('No tests to rebaseline; exiting.') 192 _log.info('No tests to rebaseline; exiting.')
193 return 193 return
194 _log.info('Tests to rebaseline:') 194 _log.info('Tests to rebaseline:')
195 for test, builds in test_prefix_list.iteritems(): 195 for test, builds in test_prefix_list.iteritems():
196 builds_str = ', '.join(sorted('%s (%s)' % (b.builder_name, b.build_n umber) for b in builds)) 196 builds_str = ', '.join(sorted('%s (%s)' % (b.builder_name, b.build_n umber) for b in builds))
197 _log.info(' %s: %s', test, builds_str) 197 _log.info(' %s: %s', test, builds_str)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698