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

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

Issue 2803143002: Support filling in baselines from other platforms in rebaseline-cl. (Closed)
Patch Set: Undo some changes Created 3 years, 8 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_cl.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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 for build, port_name in build_port_pairs: 168 for build, port_name in build_port_pairs:
169 yield (test, build, port_name) 169 yield (test, build, port_name)
170 170
171 def __str__(self): 171 def __str__(self):
172 if not self._test_prefix_map: 172 if not self._test_prefix_map:
173 return '<Empty TestBaselineSet>' 173 return '<Empty TestBaselineSet>'
174 return ('<TestBaselineSet with:\n ' + 174 return ('<TestBaselineSet with:\n ' +
175 '\n '.join('%s: %s, %s' % triple for triple in self._iter_combi nations()) + 175 '\n '.join('%s: %s, %s' % triple for triple in self._iter_combi nations()) +
176 '>') 176 '>')
177 177
178 def test_prefixes(self):
179 return sorted(self._test_prefix_map)
180
181 def build_port_pairs(self, test_prefix):
182 # Return a copy in case the caller modifies the returned list.
183 return list(self._test_prefix_map[test_prefix])
184
178 def add(self, test_prefix, build, port_name=None): 185 def add(self, test_prefix, build, port_name=None):
179 """Adds an entry for baselines to download for some set of tests. 186 """Adds an entry for baselines to download for some set of tests.
180 187
181 Args: 188 Args:
182 test_prefix: This can be a full test path, or directory of tests, or a path with globs. 189 test_prefix: This can be a full test path, or directory of tests, or a path with globs.
183 build: A Build object. This specifies where to fetch baselines from. 190 build: A Build object. This specifies where to fetch baselines from.
184 port_name: This specifies what platform the baseline is for. 191 port_name: This specifies what platform the baseline is for.
185 """ 192 """
186 port_name = port_name or self._host.builders.port_name_for_builder_name( build.builder_name) 193 port_name = port_name or self._host.builders.port_name_for_builder_name( build.builder_name)
187 self._builder_names.add(build.builder_name) 194 self._builder_names.add(build.builder_name)
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 767
761 test_baseline_set = TestBaselineSet(tool) 768 test_baseline_set = TestBaselineSet(tool)
762 769
763 for builder in builders_to_check: 770 for builder in builders_to_check:
764 for test_prefix in args: 771 for test_prefix in args:
765 test_baseline_set.add(test_prefix, Build(builder)) 772 test_baseline_set.add(test_prefix, Build(builder))
766 773
767 _log.debug('Rebaselining: %s', test_baseline_set) 774 _log.debug('Rebaselining: %s', test_baseline_set)
768 775
769 self.rebaseline(options, test_baseline_set) 776 self.rebaseline(options, test_baseline_set)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698