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

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: Initial version of fill_in_missing_results 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
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 self._test_prefix_map[test_prefix]
wkorman 2017/04/10 20:12:27 Should we make a defensive copy so that if caller
qyearsley 2017/04/10 23:52:09 Ah, good point :-) Done.
183
178 def add(self, test_prefix, build, port_name=None): 184 def add(self, test_prefix, build, port_name=None):
179 """Adds an entry for baselines to download for some set of tests. 185 """Adds an entry for baselines to download for some set of tests.
180 186
181 Args: 187 Args:
182 test_prefix: This can be a full test path, or directory of tests, or a path with globs. 188 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. 189 build: A Build object. This specifies where to fetch baselines from.
184 port_name: This specifies what platform the baseline is for. 190 port_name: This specifies what platform the baseline is for.
185 """ 191 """
186 port_name = port_name or self._host.builders.port_name_for_builder_name( build.builder_name) 192 port_name = port_name or self._host.builders.port_name_for_builder_name( build.builder_name)
187 self._builder_names.add(build.builder_name) 193 self._builder_names.add(build.builder_name)
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 766
761 test_baseline_set = TestBaselineSet(tool) 767 test_baseline_set = TestBaselineSet(tool)
762 768
763 for builder in builders_to_check: 769 for builder in builders_to_check:
764 for test_prefix in args: 770 for test_prefix in args:
765 test_baseline_set.add(test_prefix, Build(builder)) 771 test_baseline_set.add(test_prefix, Build(builder))
766 772
767 _log.debug('Rebaselining: %s', test_baseline_set) 773 _log.debug('Rebaselining: %s', test_baseline_set)
768 774
769 self.rebaseline(options, test_baseline_set) 775 self.rebaseline(options, test_baseline_set)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698