| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 baseline_search_paths = self.baseline_search_path() | 293 baseline_search_paths = self.baseline_search_path() |
| 294 return baseline_search_paths[0] | 294 return baseline_search_paths[0] |
| 295 | 295 |
| 296 def virtual_baseline_search_path(self, test_name): | 296 def virtual_baseline_search_path(self, test_name): |
| 297 suite = self.lookup_virtual_suite(test_name) | 297 suite = self.lookup_virtual_suite(test_name) |
| 298 if not suite: | 298 if not suite: |
| 299 return None | 299 return None |
| 300 return [self._filesystem.join(path, suite.name) for path in self.default
_baseline_search_path()] | 300 return [self._filesystem.join(path, suite.name) for path in self.default
_baseline_search_path()] |
| 301 | 301 |
| 302 def baseline_search_path(self): | 302 def baseline_search_path(self): |
| 303 return self.get_option('additional_platform_directory', []) + self._comp
are_baseline() + self.default_baseline_search_path() | 303 return (self.get_option('additional_platform_directory', []) + |
| 304 self._flag_specific_baseline_search_path() + |
| 305 self._compare_baseline() + |
| 306 self.default_baseline_search_path()) |
| 304 | 307 |
| 305 def default_baseline_search_path(self): | 308 def default_baseline_search_path(self): |
| 306 """Return a list of absolute paths to directories to search under for | 309 """Return a list of absolute paths to directories to search under for |
| 307 baselines. The directories are searched in order.""" | 310 baselines. The directories are searched in order.""" |
| 308 return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self.version(
)]) | 311 return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self.version(
)]) |
| 309 | 312 |
| 310 @memoized | 313 @memoized |
| 311 def _compare_baseline(self): | 314 def _compare_baseline(self): |
| 312 factory = PortFactory(self.host) | 315 factory = PortFactory(self.host) |
| 313 target_port = self.get_option('compare_port') | 316 target_port = self.get_option('compare_port') |
| (...skipping 944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 test_configurations.append(TestConfiguration(version, architectu
re, build_type)) | 1261 test_configurations.append(TestConfiguration(version, architectu
re, build_type)) |
| 1259 return test_configurations | 1262 return test_configurations |
| 1260 | 1263 |
| 1261 def warn_if_bug_missing_in_test_expectations(self): | 1264 def warn_if_bug_missing_in_test_expectations(self): |
| 1262 return True | 1265 return True |
| 1263 | 1266 |
| 1264 def _flag_specific_expectations_files(self): | 1267 def _flag_specific_expectations_files(self): |
| 1265 return [self._filesystem.join(self.layout_tests_dir(), 'FlagExpectations
', flag.lstrip('-')) | 1268 return [self._filesystem.join(self.layout_tests_dir(), 'FlagExpectations
', flag.lstrip('-')) |
| 1266 for flag in self.get_option('additional_driver_flag', [])] | 1269 for flag in self.get_option('additional_driver_flag', [])] |
| 1267 | 1270 |
| 1271 def _flag_specific_baseline_search_path(self): |
| 1272 # TODO(skobes): Baselines specific to both flag and platform? |
| 1273 return [self._filesystem.join(self.layout_tests_dir(), 'flag-specific',
flag.lstrip('-')) |
| 1274 for flag in self.get_option('additional_driver_flag', [])] |
| 1275 |
| 1268 def expectations_dict(self): | 1276 def expectations_dict(self): |
| 1269 """Returns an OrderedDict of name -> expectations strings. | 1277 """Returns an OrderedDict of name -> expectations strings. |
| 1270 The names are expected to be (but not required to be) paths in the files
ystem. | 1278 The names are expected to be (but not required to be) paths in the files
ystem. |
| 1271 If the name is a path, the file can be considered updatable for things l
ike rebaselining, | 1279 If the name is a path, the file can be considered updatable for things l
ike rebaselining, |
| 1272 so don't use names that are paths if they're not paths. | 1280 so don't use names that are paths if they're not paths. |
| 1273 Generally speaking the ordering should be files in the filesystem in cas
cade order | 1281 Generally speaking the ordering should be files in the filesystem in cas
cade order |
| 1274 (TestExpectations followed by Skipped, if the port honors both formats), | 1282 (TestExpectations followed by Skipped, if the port honors both formats), |
| 1275 then any built-in expectations (e.g., from compile-time exclusions), the
n --additional-expectations options.""" | 1283 then any built-in expectations (e.g., from compile-time exclusions), the
n --additional-expectations options.""" |
| 1276 # FIXME: rename this to test_expectations() once all the callers are upd
ated to know about the ordered dict. | 1284 # FIXME: rename this to test_expectations() once all the callers are upd
ated to know about the ordered dict. |
| 1277 expectations = collections.OrderedDict() | 1285 expectations = collections.OrderedDict() |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1779 | 1787 |
| 1780 def __init__(self, base, args, reference_args=None): | 1788 def __init__(self, base, args, reference_args=None): |
| 1781 self.name = base | 1789 self.name = base |
| 1782 self.base = base | 1790 self.base = base |
| 1783 self.args = args | 1791 self.args = args |
| 1784 self.reference_args = args if reference_args is None else reference_args | 1792 self.reference_args = args if reference_args is None else reference_args |
| 1785 self.tests = set() | 1793 self.tests = set() |
| 1786 | 1794 |
| 1787 def __repr__(self): | 1795 def __repr__(self): |
| 1788 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1796 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |