| 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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 tests.append(file_path) | 742 tests.append(file_path) |
| 743 continue | 743 continue |
| 744 urls = self._wpt_manifest().file_path_to_url_paths(match.group(1)) | 744 urls = self._wpt_manifest().file_path_to_url_paths(match.group(1)) |
| 745 for url in urls: | 745 for url in urls: |
| 746 tests.append(file_path[0:match.start(1)] + url) | 746 tests.append(file_path[0:match.start(1)] + url) |
| 747 return tests | 747 return tests |
| 748 | 748 |
| 749 @memoized | 749 @memoized |
| 750 def _wpt_manifest(self): | 750 def _wpt_manifest(self): |
| 751 manifest_path = self._filesystem.join(self.layout_tests_dir(), 'external
', 'wpt', 'MANIFEST.json') | 751 manifest_path = self._filesystem.join(self.layout_tests_dir(), 'external
', 'wpt', 'MANIFEST.json') |
| 752 if not self._filesystem.exists(manifest_path): |
| 753 _log.error('Manifest not found at %s. See http://crbug.com/698294',
manifest_path) |
| 754 return WPTManifest('{}') |
| 752 return WPTManifest(self._filesystem.read_text_file(manifest_path)) | 755 return WPTManifest(self._filesystem.read_text_file(manifest_path)) |
| 753 | 756 |
| 754 def is_slow_wpt_test(self, test_file): | 757 def is_slow_wpt_test(self, test_file): |
| 755 match = re.match(r'external/wpt/(.*)', test_file) | 758 match = re.match(r'external/wpt/(.*)', test_file) |
| 756 if not match: | 759 if not match: |
| 757 return False | 760 return False |
| 758 return self._wpt_manifest().is_slow_test(match.group(1)) | 761 return self._wpt_manifest().is_slow_test(match.group(1)) |
| 759 | 762 |
| 760 ALL_TEST_TYPES = ['audio', 'harness', 'pixel', 'ref', 'text', 'unknown'] | 763 ALL_TEST_TYPES = ['audio', 'harness', 'pixel', 'ref', 'text', 'unknown'] |
| 761 | 764 |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1635 | 1638 |
| 1636 def __init__(self, base, args, reference_args=None): | 1639 def __init__(self, base, args, reference_args=None): |
| 1637 self.name = base | 1640 self.name = base |
| 1638 self.base = base | 1641 self.base = base |
| 1639 self.args = args | 1642 self.args = args |
| 1640 self.reference_args = args if reference_args is None else reference_args | 1643 self.reference_args = args if reference_args is None else reference_args |
| 1641 self.tests = set() | 1644 self.tests = set() |
| 1642 | 1645 |
| 1643 def __repr__(self): | 1646 def __repr__(self): |
| 1644 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1647 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |