Chromium Code Reviews| 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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 657 reftest_list = [] | 657 reftest_list = [] |
| 658 for expectation, prefix in (('==', ''), ('!=', '-mismatch')): | 658 for expectation, prefix in (('==', ''), ('!=', '-mismatch')): |
| 659 for extension in Port.supported_file_extensions: | 659 for extension in Port.supported_file_extensions: |
| 660 path = self.expected_filename(test_name, prefix + extension) | 660 path = self.expected_filename(test_name, prefix + extension) |
| 661 if self._filesystem.exists(path): | 661 if self._filesystem.exists(path): |
| 662 reftest_list.append((expectation, path)) | 662 reftest_list.append((expectation, path)) |
| 663 if reftest_list: | 663 if reftest_list: |
| 664 return reftest_list | 664 return reftest_list |
| 665 | 665 |
| 666 # Try to extract information from MANIFEST.json. | 666 # Try to extract information from MANIFEST.json. |
| 667 match = re.match(r'virtual/[^/]+/', test_name) | |
|
tkent
2017/04/14 06:58:32
Please add a test case for virtual/ in test_refere
kojii
2017/04/14 08:02:59
Done, thank you for the detailed support!
| |
| 668 if match: | |
| 669 test_name = test_name[match.end(0):] | |
| 667 match = re.match(r'external/wpt/(.*)', test_name) | 670 match = re.match(r'external/wpt/(.*)', test_name) |
| 668 if not match: | 671 if not match: |
| 669 return [] | 672 return [] |
| 670 path_in_wpt = match.group(1) | 673 path_in_wpt = match.group(1) |
| 671 for expectation, ref_path_in_wpt in self._wpt_manifest().extract_referen ce_list(path_in_wpt): | 674 for expectation, ref_path_in_wpt in self._wpt_manifest().extract_referen ce_list(path_in_wpt): |
| 672 ref_absolute_path = self._filesystem.join(self.layout_tests_dir(), ' external/wpt' + ref_path_in_wpt) | 675 ref_absolute_path = self._filesystem.join(self.layout_tests_dir(), ' external/wpt' + ref_path_in_wpt) |
| 673 reftest_list.append((expectation, ref_absolute_path)) | 676 reftest_list.append((expectation, ref_absolute_path)) |
| 674 return reftest_list | 677 return reftest_list |
| 675 | 678 |
| 676 def tests(self, paths): | 679 def tests(self, paths): |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1619 | 1622 |
| 1620 def __init__(self, base, args, reference_args=None): | 1623 def __init__(self, base, args, reference_args=None): |
| 1621 self.name = base | 1624 self.name = base |
| 1622 self.base = base | 1625 self.base = base |
| 1623 self.args = args | 1626 self.args = args |
| 1624 self.reference_args = args if reference_args is None else reference_args | 1627 self.reference_args = args if reference_args is None else reference_args |
| 1625 self.tests = set() | 1628 self.tests = set() |
| 1626 | 1629 |
| 1627 def __repr__(self): | 1630 def __repr__(self): |
| 1628 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) | 1631 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) |
| OLD | NEW |