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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py

Issue 1940413002: Re-enable the use of NeedsRebaseline to drive the auto-rebaseline bot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 expectation_line.matching_configurations = self._test_configuration_conv erter.to_config_set( 163 expectation_line.matching_configurations = self._test_configuration_conv erter.to_config_set(
164 parsed_specifiers, expectation_line.warnings) 164 parsed_specifiers, expectation_line.warnings)
165 165
166 def _lint_line(self, expectation_line): 166 def _lint_line(self, expectation_line):
167 expectations = [expectation.lower() for expectation in expectation_line. expectations] 167 expectations = [expectation.lower() for expectation in expectation_line. expectations]
168 if not expectation_line.bugs and self.WONTFIX_MODIFIER not in expectatio ns: 168 if not expectation_line.bugs and self.WONTFIX_MODIFIER not in expectatio ns:
169 expectation_line.warnings.append(self.MISSING_BUG_WARNING) 169 expectation_line.warnings.append(self.MISSING_BUG_WARNING)
170 if self.REBASELINE_MODIFIER in expectations: 170 if self.REBASELINE_MODIFIER in expectations:
171 expectation_line.warnings.append('REBASELINE should only be used for running rebaseline.py. Cannot be checked in.') 171 expectation_line.warnings.append('REBASELINE should only be used for running rebaseline.py. Cannot be checked in.')
172 172
173 # TODO(crbug.com/603753) - Don't let NeedsRebaseline be checked in while the auto-rebaseline-bot is down.
174 if self.NEEDS_REBASELINE_MODIFIER in expectations:
175 expectation_line.warnings.append('NeedsRebaseline is broken at the m oment. See crbug.com/603753.')
176
177 if self.NEEDS_REBASELINE_MODIFIER in expectations or self.NEEDS_MANUAL_R EBASELINE_MODIFIER in expectations: 173 if self.NEEDS_REBASELINE_MODIFIER in expectations or self.NEEDS_MANUAL_R EBASELINE_MODIFIER in expectations:
178 for test in expectation_line.matching_tests: 174 for test in expectation_line.matching_tests:
179 if self._port.reference_files(test): 175 if self._port.reference_files(test):
180 expectation_line.warnings.append('A reftest cannot be marked as NeedsRebaseline/NeedsManualRebaseline') 176 expectation_line.warnings.append('A reftest cannot be marked as NeedsRebaseline/NeedsManualRebaseline')
181 177
182 specifiers = [specifier.lower() for specifier in expectation_line.specif iers] 178 specifiers = [specifier.lower() for specifier in expectation_line.specif iers]
183 if (self.REBASELINE_MODIFIER in expectations or self.NEEDS_REBASELINE_MO DIFIER in expectations) and ('debug' in specifiers or 'release' in specifiers): 179 if (self.REBASELINE_MODIFIER in expectations or self.NEEDS_REBASELINE_MO DIFIER in expectations) and ('debug' in specifiers or 'release' in specifiers):
184 expectation_line.warnings.append('A test cannot be rebaselined for D ebug/Release.') 180 expectation_line.warnings.append('A test cannot be rebaselined for D ebug/Release.')
185 181
186 def _parse_expectations(self, expectation_line): 182 def _parse_expectations(self, expectation_line):
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 # If reconstitute_only_these is an empty list, we want to return ori ginal_string. 1164 # If reconstitute_only_these is an empty list, we want to return ori ginal_string.
1169 # So we need to compare reconstitute_only_these to None, not just ch eck if it's falsey. 1165 # So we need to compare reconstitute_only_these to None, not just ch eck if it's falsey.
1170 if reconstitute_only_these is None or expectation_line in reconstitu te_only_these: 1166 if reconstitute_only_these is None or expectation_line in reconstitu te_only_these:
1171 return expectation_line.to_string(test_configuration_converter) 1167 return expectation_line.to_string(test_configuration_converter)
1172 return expectation_line.original_string 1168 return expectation_line.original_string
1173 1169
1174 def nones_out(expectation_line): 1170 def nones_out(expectation_line):
1175 return expectation_line is not None 1171 return expectation_line is not None
1176 1172
1177 return "\n".join(filter(nones_out, map(serialize, expectation_lines))) 1173 return "\n".join(filter(nones_out, map(serialize, expectation_lines)))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698