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

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

Issue 1766583002: Added update_test_expectations script to remove non-flaky test expectations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase after long break Created 4 years, 5 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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 1030
1031 self._has_warnings = False 1031 self._has_warnings = False
1032 self._report_warnings() 1032 self._report_warnings()
1033 self._process_tests_without_expectations() 1033 self._process_tests_without_expectations()
1034 1034
1035 # TODO(ojan): Allow for removing skipped tests when getting the list of 1035 # TODO(ojan): Allow for removing skipped tests when getting the list of
1036 # tests to run, but not when getting metrics. 1036 # tests to run, but not when getting metrics.
1037 def model(self): 1037 def model(self):
1038 return self._model 1038 return self._model
1039 1039
1040 def expectations(self):
1041 return self._expectations
1042
1040 def get_needs_rebaseline_failures(self): 1043 def get_needs_rebaseline_failures(self):
1041 return self._model.get_test_set(NEEDS_REBASELINE) 1044 return self._model.get_test_set(NEEDS_REBASELINE)
1042 1045
1043 def get_rebaselining_failures(self): 1046 def get_rebaselining_failures(self):
1044 return self._model.get_test_set(REBASELINE) 1047 return self._model.get_test_set(REBASELINE)
1045 1048
1046 # FIXME: Change the callsites to use TestExpectationsModel and remove. 1049 # FIXME: Change the callsites to use TestExpectationsModel and remove.
1047 def get_expectations(self, test): 1050 def get_expectations(self, test):
1048 return self._model.get_expectations(test) 1051 return self._model.get_expectations(test)
1049 1052
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 # If reconstitute_only_these is an empty list, we want to return ori ginal_string. 1190 # If reconstitute_only_these is an empty list, we want to return ori ginal_string.
1188 # So we need to compare reconstitute_only_these to None, not just ch eck if it's falsey. 1191 # So we need to compare reconstitute_only_these to None, not just ch eck if it's falsey.
1189 if reconstitute_only_these is None or expectation_line in reconstitu te_only_these: 1192 if reconstitute_only_these is None or expectation_line in reconstitu te_only_these:
1190 return expectation_line.to_string(test_configuration_converter) 1193 return expectation_line.to_string(test_configuration_converter)
1191 return expectation_line.original_string 1194 return expectation_line.original_string
1192 1195
1193 def nones_out(expectation_line): 1196 def nones_out(expectation_line):
1194 return expectation_line is not None 1197 return expectation_line is not None
1195 1198
1196 return "\n".join(filter(nones_out, map(serialize, expectation_lines))) 1199 return "\n".join(filter(nones_out, map(serialize, expectation_lines)))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698