| 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 25 matching lines...) Expand all Loading... |
| 36 import errno | 36 import errno |
| 37 import itertools | 37 import itertools |
| 38 import json | 38 import json |
| 39 import logging | 39 import logging |
| 40 import os | 40 import os |
| 41 import operator | 41 import operator |
| 42 import optparse | 42 import optparse |
| 43 import re | 43 import re |
| 44 import sys | 44 import sys |
| 45 | 45 |
| 46 | |
| 47 from webkitpy.common import find_files | 46 from webkitpy.common import find_files |
| 48 from webkitpy.common import read_checksum_from_png | 47 from webkitpy.common import read_checksum_from_png |
| 49 from webkitpy.common.memoized import memoized | 48 from webkitpy.common.memoized import memoized |
| 50 from webkitpy.common.system.executive import ScriptError | 49 from webkitpy.common.system.executive import ScriptError |
| 51 from webkitpy.common.system.path import cygpath, abspath_to_uri | 50 from webkitpy.common.system.path import cygpath, abspath_to_uri |
| 52 from webkitpy.common.webkit_finder import WebKitFinder | 51 from webkitpy.common.webkit_finder import WebKitFinder |
| 53 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory | 52 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory |
| 54 from webkitpy.layout_tests.models import test_run_results | 53 from webkitpy.layout_tests.models import test_run_results |
| 55 from webkitpy.layout_tests.models.test_configuration import TestConfiguration | 54 from webkitpy.layout_tests.models.test_configuration import TestConfiguration |
| 55 from webkitpy.layout_tests.models.test_expectations import SKIP |
| 56 from webkitpy.layout_tests.port import driver | 56 from webkitpy.layout_tests.port import driver |
| 57 from webkitpy.layout_tests.port import server_process | 57 from webkitpy.layout_tests.port import server_process |
| 58 from webkitpy.layout_tests.port.factory import PortFactory | 58 from webkitpy.layout_tests.port.factory import PortFactory |
| 59 from webkitpy.layout_tests.servers import apache_http | 59 from webkitpy.layout_tests.servers import apache_http |
| 60 from webkitpy.layout_tests.servers import pywebsocket | 60 from webkitpy.layout_tests.servers import pywebsocket |
| 61 from webkitpy.layout_tests.servers import wptserve | 61 from webkitpy.layout_tests.servers import wptserve |
| 62 from functools import reduce # pylint: disable=redefined-builtin | 62 from functools import reduce # pylint: disable=redefined-builtin |
| 63 | 63 |
| 64 _log = logging.getLogger(__name__) | 64 _log = logging.getLogger(__name__) |
| 65 | 65 |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 def layout_tests_dir(self): | 925 def layout_tests_dir(self): |
| 926 return self._webkit_finder.layout_tests_dir() | 926 return self._webkit_finder.layout_tests_dir() |
| 927 | 927 |
| 928 def perf_tests_dir(self): | 928 def perf_tests_dir(self): |
| 929 return self._webkit_finder.perf_tests_dir() | 929 return self._webkit_finder.perf_tests_dir() |
| 930 | 930 |
| 931 def skipped_layout_tests(self, test_list): | 931 def skipped_layout_tests(self, test_list): |
| 932 """Returns tests skipped outside of the TestExpectations files.""" | 932 """Returns tests skipped outside of the TestExpectations files.""" |
| 933 return set(self._skipped_tests_for_unsupported_features(test_list)) | 933 return set(self._skipped_tests_for_unsupported_features(test_list)) |
| 934 | 934 |
| 935 def skips_test(self, test, generic_expectations, full_expectations): |
| 936 """Checks whether the given test is skipped for this port. |
| 937 |
| 938 This should return True if the test is skipped because the port |
| 939 runs smoke tests only, or because there's a skip test expectation line. |
| 940 """ |
| 941 fs = self.host.filesystem |
| 942 if self.default_smoke_test_only(): |
| 943 smoke_test_filename = fs.join(self.layout_tests_dir(), 'SmokeTests') |
| 944 if fs.exists(smoke_test_filename) and test not in fs.read_text_file(
smoke_test_filename): |
| 945 return True |
| 946 |
| 947 return (SKIP in full_expectations.get_expectations(test) and |
| 948 SKIP not in generic_expectations.get_expectations(test)) |
| 949 |
| 935 def _tests_from_skipped_file_contents(self, skipped_file_contents): | 950 def _tests_from_skipped_file_contents(self, skipped_file_contents): |
| 936 tests_to_skip = [] | 951 tests_to_skip = [] |
| 937 for line in skipped_file_contents.split('\n'): | 952 for line in skipped_file_contents.split('\n'): |
| 938 line = line.strip() | 953 line = line.strip() |
| 939 line = line.rstrip('/') # Best to normalize directory names to not
include the trailing slash. | 954 line = line.rstrip('/') # Best to normalize directory names to not
include the trailing slash. |
| 940 if line.startswith('#') or not len(line): | 955 if line.startswith('#') or not len(line): |
| 941 continue | 956 continue |
| 942 tests_to_skip.append(line) | 957 tests_to_skip.append(line) |
| 943 return tests_to_skip | 958 return tests_to_skip |
| 944 | 959 |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1829 | 1844 |
| 1830 def __init__(self, base, args, reference_args=None): | 1845 def __init__(self, base, args, reference_args=None): |
| 1831 self.name = base | 1846 self.name = base |
| 1832 self.base = base | 1847 self.base = base |
| 1833 self.args = args | 1848 self.args = args |
| 1834 self.reference_args = args if reference_args is None else reference_args | 1849 self.reference_args = args if reference_args is None else reference_args |
| 1835 self.tests = set() | 1850 self.tests = set() |
| 1836 | 1851 |
| 1837 def __repr__(self): | 1852 def __repr__(self): |
| 1838 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1853 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |