OLD | NEW |
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 Loading... |
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 Loading... |
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))) |
OLD | NEW |