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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 return extension in Port.supported_file_extensions | 718 return extension in Port.supported_file_extensions |
719 | 719 |
720 def is_test_file(self, filesystem, dirname, filename): | 720 def is_test_file(self, filesystem, dirname, filename): |
721 match = re.search(r'[/\\]external[/\\]wpt([/\\].*)?$', dirname) | 721 match = re.search(r'[/\\]external[/\\]wpt([/\\].*)?$', dirname) |
722 if match: | 722 if match: |
723 if match.group(1): | 723 if match.group(1): |
724 path_in_wpt = match.group(1)[1:].replace('\\', '/') + '/' + file
name | 724 path_in_wpt = match.group(1)[1:].replace('\\', '/') + '/' + file
name |
725 else: | 725 else: |
726 path_in_wpt = filename | 726 path_in_wpt = filename |
727 return self._wpt_manifest().is_test_file(path_in_wpt) | 727 return self._wpt_manifest().is_test_file(path_in_wpt) |
728 if 'inspector-unit' in dirname: | 728 if 'inspector-unit' in dirname or 'devtools-js' in dirname: |
729 return filesystem.splitext(filename)[1] == '.js' | 729 return filesystem.splitext(filename)[1] == '.js' |
730 return Port._has_supported_extension( | 730 return Port._has_supported_extension( |
731 filesystem, filename) and not Port.is_reference_html_file(filesystem
, dirname, filename) | 731 filesystem, filename) and not Port.is_reference_html_file(filesystem
, dirname, filename) |
732 | 732 |
733 def _convert_wpt_file_paths_to_url_paths(self, files): | 733 def _convert_wpt_file_paths_to_url_paths(self, files): |
734 tests = [] | 734 tests = [] |
735 for file_path in files: | 735 for file_path in files: |
736 # Path separators are normalized by relative_test_filename(). | 736 # Path separators are normalized by relative_test_filename(). |
737 match = re.search(r'external/wpt/(.*)$', file_path) | 737 match = re.search(r'external/wpt/(.*)$', file_path) |
738 if not match: | 738 if not match: |
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 | 1635 |
1636 def __init__(self, base, args, reference_args=None): | 1636 def __init__(self, base, args, reference_args=None): |
1637 self.name = base | 1637 self.name = base |
1638 self.base = base | 1638 self.base = base |
1639 self.args = args | 1639 self.args = args |
1640 self.reference_args = args if reference_args is None else reference_args | 1640 self.reference_args = args if reference_args is None else reference_args |
1641 self.tests = set() | 1641 self.tests = set() |
1642 | 1642 |
1643 def __repr__(self): | 1643 def __repr__(self): |
1644 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1644 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
OLD | NEW |