| 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 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 921 return set(self._skipped_tests_for_unsupported_features(test_list)) | 921 return set(self._skipped_tests_for_unsupported_features(test_list)) |
| 922 | 922 |
| 923 def skips_test(self, test, generic_expectations, full_expectations): | 923 def skips_test(self, test, generic_expectations, full_expectations): |
| 924 """Checks whether the given test is skipped for this port. | 924 """Checks whether the given test is skipped for this port. |
| 925 | 925 |
| 926 This should return True if the test is skipped because the port | 926 This should return True if the test is skipped because the port |
| 927 runs smoke tests only, or because the | 927 runs smoke tests only, or because the |
| 928 """ | 928 """ |
| 929 fs = self.host.filesystem | 929 fs = self.host.filesystem |
| 930 if self.default_smoke_test_only(): | 930 if self.default_smoke_test_only(): |
| 931 smoke_test_filename = fs.join(self.layout_tests_dir(), 'SmokeTests') | 931 smoke_test_filename = self.path_to_smoke_tests_file() |
| 932 if fs.exists(smoke_test_filename) and test not in fs.read_text_file(
smoke_test_filename): | 932 if fs.exists(smoke_test_filename) and test not in fs.read_text_file(
smoke_test_filename): |
| 933 return True | 933 return True |
| 934 | 934 |
| 935 # In general, Skip lines in the generic expectations file indicate | 935 # In general, Skip lines in the generic expectations file indicate |
| 936 # that the test is temporarily skipped, whereas if the test is skipped | 936 # that the test is temporarily skipped, whereas if the test is skipped |
| 937 # in another file (e.g. WontFix in NeverFixTests), then the test may | 937 # in another file (e.g. WontFix in NeverFixTests), then the test may |
| 938 # always be skipped for this port. | 938 # always be skipped for this port. |
| 939 # TODO(qyearsley): Simplify this so that it doesn't rely on having | 939 # TODO(qyearsley): Simplify this so that it doesn't rely on having |
| 940 # two copies of the test expectations. | 940 # two copies of the test expectations. |
| 941 return (SKIP in full_expectations.get_expectations(test) and | 941 return (SKIP in full_expectations.get_expectations(test) and |
| 942 SKIP not in generic_expectations.get_expectations(test)) | 942 SKIP not in generic_expectations.get_expectations(test)) |
| 943 | 943 |
| 944 def path_to_smoke_tests_file(self): |
| 945 return self.host.filesystem.join(self.layout_tests_dir(), 'SmokeTests') |
| 946 |
| 944 def _tests_from_skipped_file_contents(self, skipped_file_contents): | 947 def _tests_from_skipped_file_contents(self, skipped_file_contents): |
| 945 tests_to_skip = [] | 948 tests_to_skip = [] |
| 946 for line in skipped_file_contents.split('\n'): | 949 for line in skipped_file_contents.split('\n'): |
| 947 line = line.strip() | 950 line = line.strip() |
| 948 line = line.rstrip('/') # Best to normalize directory names to not
include the trailing slash. | 951 line = line.rstrip('/') # Best to normalize directory names to not
include the trailing slash. |
| 949 if line.startswith('#') or not len(line): | 952 if line.startswith('#') or not len(line): |
| 950 continue | 953 continue |
| 951 tests_to_skip.append(line) | 954 tests_to_skip.append(line) |
| 952 return tests_to_skip | 955 return tests_to_skip |
| 953 | 956 |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 | 1784 |
| 1782 def __init__(self, base, args, reference_args=None): | 1785 def __init__(self, base, args, reference_args=None): |
| 1783 self.name = base | 1786 self.name = base |
| 1784 self.base = base | 1787 self.base = base |
| 1785 self.args = args | 1788 self.args = args |
| 1786 self.reference_args = args if reference_args is None else reference_args | 1789 self.reference_args = args if reference_args is None else reference_args |
| 1787 self.tests = set() | 1790 self.tests = set() |
| 1788 | 1791 |
| 1789 def __repr__(self): | 1792 def __repr__(self): |
| 1790 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1793 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |