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