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 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 return True | 1288 return True |
1289 | 1289 |
1290 def _port_specific_expectations_files(self): | 1290 def _port_specific_expectations_files(self): |
1291 paths = [] | 1291 paths = [] |
1292 paths.append(self.path_from_chromium_base('skia', 'skia_test_expectation
s.txt')) | 1292 paths.append(self.path_from_chromium_base('skia', 'skia_test_expectation
s.txt')) |
1293 paths.append(self._filesystem.join(self.layout_tests_dir(), 'NeverFixTes
ts')) | 1293 paths.append(self._filesystem.join(self.layout_tests_dir(), 'NeverFixTes
ts')) |
1294 paths.append(self._filesystem.join(self.layout_tests_dir(), 'StaleTestEx
pectations')) | 1294 paths.append(self._filesystem.join(self.layout_tests_dir(), 'StaleTestEx
pectations')) |
1295 paths.append(self._filesystem.join(self.layout_tests_dir(), 'SlowTests')
) | 1295 paths.append(self._filesystem.join(self.layout_tests_dir(), 'SlowTests')
) |
1296 return paths | 1296 return paths |
1297 | 1297 |
| 1298 def _flag_specific_expectations_files(self): |
| 1299 return [self._filesystem.join(self.layout_tests_dir(), 'FlagExpectations
', flag.lstrip('-')) |
| 1300 for flag in self.get_option('additional_driver_flag', [])] |
| 1301 |
1298 def expectations_dict(self): | 1302 def expectations_dict(self): |
1299 """Returns an OrderedDict of name -> expectations strings. | 1303 """Returns an OrderedDict of name -> expectations strings. |
1300 The names are expected to be (but not required to be) paths in the files
ystem. | 1304 The names are expected to be (but not required to be) paths in the files
ystem. |
1301 If the name is a path, the file can be considered updatable for things l
ike rebaselining, | 1305 If the name is a path, the file can be considered updatable for things l
ike rebaselining, |
1302 so don't use names that are paths if they're not paths. | 1306 so don't use names that are paths if they're not paths. |
1303 Generally speaking the ordering should be files in the filesystem in cas
cade order | 1307 Generally speaking the ordering should be files in the filesystem in cas
cade order |
1304 (TestExpectations followed by Skipped, if the port honors both formats), | 1308 (TestExpectations followed by Skipped, if the port honors both formats), |
1305 then any built-in expectations (e.g., from compile-time exclusions), the
n --additional-expectations options.""" | 1309 then any built-in expectations (e.g., from compile-time exclusions), the
n --additional-expectations options.""" |
1306 # FIXME: rename this to test_expectations() once all the callers are upd
ated to know about the ordered dict. | 1310 # FIXME: rename this to test_expectations() once all the callers are upd
ated to know about the ordered dict. |
1307 expectations = OrderedDict() | 1311 expectations = OrderedDict() |
(...skipping 27 matching lines...) Expand all Loading... |
1335 | 1339 |
1336 ignore_mode = self.get_option('ignore_flaky_tests') | 1340 ignore_mode = self.get_option('ignore_flaky_tests') |
1337 if ignore_mode == 'very-flaky' or ignore_mode == 'maybe-flaky': | 1341 if ignore_mode == 'very-flaky' or ignore_mode == 'maybe-flaky': |
1338 return expectations.flakes_by_path(ignore_mode == 'very-flaky') | 1342 return expectations.flakes_by_path(ignore_mode == 'very-flaky') |
1339 if ignore_mode == 'unexpected': | 1343 if ignore_mode == 'unexpected': |
1340 return expectations.unexpected_results_by_path() | 1344 return expectations.unexpected_results_by_path() |
1341 _log.warning("Unexpected ignore mode: '%s'." % ignore_mode) | 1345 _log.warning("Unexpected ignore mode: '%s'." % ignore_mode) |
1342 return {} | 1346 return {} |
1343 | 1347 |
1344 def expectations_files(self): | 1348 def expectations_files(self): |
1345 return [self.path_to_generic_test_expectations_file()] + self._port_spec
ific_expectations_files() | 1349 return ([self.path_to_generic_test_expectations_file()] + |
| 1350 self._port_specific_expectations_files() + |
| 1351 self._flag_specific_expectations_files()) |
1346 | 1352 |
1347 def repository_path(self): | 1353 def repository_path(self): |
1348 """Returns the repository path for the chromium code base.""" | 1354 """Returns the repository path for the chromium code base.""" |
1349 return self.path_from_chromium_base('build') | 1355 return self.path_from_chromium_base('build') |
1350 | 1356 |
1351 _WDIFF_DEL = '##WDIFF_DEL##' | 1357 _WDIFF_DEL = '##WDIFF_DEL##' |
1352 _WDIFF_ADD = '##WDIFF_ADD##' | 1358 _WDIFF_ADD = '##WDIFF_ADD##' |
1353 _WDIFF_END = '##WDIFF_END##' | 1359 _WDIFF_END = '##WDIFF_END##' |
1354 | 1360 |
1355 def _format_wdiff_output_as_html(self, wdiff): | 1361 def _format_wdiff_output_as_html(self, wdiff): |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1788 class PhysicalTestSuite(object): | 1794 class PhysicalTestSuite(object): |
1789 def __init__(self, base, args, reference_args=None): | 1795 def __init__(self, base, args, reference_args=None): |
1790 self.name = base | 1796 self.name = base |
1791 self.base = base | 1797 self.base = base |
1792 self.args = args | 1798 self.args = args |
1793 self.reference_args = args if reference_args is None else reference_args | 1799 self.reference_args = args if reference_args is None else reference_args |
1794 self.tests = set() | 1800 self.tests = set() |
1795 | 1801 |
1796 def __repr__(self): | 1802 def __repr__(self): |
1797 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1803 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
OLD | NEW |