| 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 12 matching lines...) Expand all Loading... |
| 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | 28 |
| 29 """Abstract base class of Port-specific entry points for the layout tests | 29 """Abstract base class of Port-specific entry points for the layout tests |
| 30 test infrastructure (the Port and Driver classes). | 30 test infrastructure (the Port and Driver classes). |
| 31 """ | 31 """ |
| 32 | 32 |
| 33 from functools import reduce # pylint: disable=redefined-builtin |
| 34 import cgi |
| 33 import collections | 35 import collections |
| 34 import cgi | |
| 35 import difflib | 36 import difflib |
| 36 import errno | 37 import errno |
| 37 import functools | 38 import functools |
| 38 import itertools | 39 import itertools |
| 39 import json | 40 import json |
| 40 import logging | 41 import logging |
| 41 import operator | 42 import operator |
| 42 import optparse | 43 import optparse |
| 43 import re | 44 import re |
| 44 import sys | 45 import sys |
| 45 | 46 |
| 46 from webkitpy.common import find_files | 47 from webkitpy.common import find_files |
| 47 from webkitpy.common import read_checksum_from_png | 48 from webkitpy.common import read_checksum_from_png |
| 48 from webkitpy.common.memoized import memoized | 49 from webkitpy.common.memoized import memoized |
| 49 from webkitpy.common.system.executive import ScriptError | 50 from webkitpy.common.system.executive import ScriptError |
| 50 from webkitpy.common.system.path import cygpath, abspath_to_uri | 51 from webkitpy.common.system.path import cygpath, abspath_to_uri |
| 51 from webkitpy.common.webkit_finder import WebKitFinder | 52 from webkitpy.common.webkit_finder import WebKitFinder |
| 52 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory | 53 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory |
| 53 from webkitpy.layout_tests.models import test_run_results | 54 from webkitpy.layout_tests.models import test_run_results |
| 54 from webkitpy.layout_tests.models.test_configuration import TestConfiguration | 55 from webkitpy.layout_tests.models.test_configuration import TestConfiguration |
| 55 from webkitpy.layout_tests.models.test_expectations import SKIP | 56 from webkitpy.layout_tests.models.test_expectations import SKIP |
| 56 from webkitpy.layout_tests.port import driver | 57 from webkitpy.layout_tests.port import driver |
| 57 from webkitpy.layout_tests.port import server_process | 58 from webkitpy.layout_tests.port import server_process |
| 58 from webkitpy.layout_tests.port.factory import PortFactory | 59 from webkitpy.layout_tests.port.factory import PortFactory |
| 59 from webkitpy.layout_tests.servers import apache_http | 60 from webkitpy.layout_tests.servers import apache_http |
| 60 from webkitpy.layout_tests.servers import pywebsocket | 61 from webkitpy.layout_tests.servers import pywebsocket |
| 61 from webkitpy.layout_tests.servers import wptserve | 62 from webkitpy.layout_tests.servers import wptserve |
| 62 from functools import reduce # pylint: disable=redefined-builtin | |
| 63 | 63 |
| 64 _log = logging.getLogger(__name__) | 64 _log = logging.getLogger(__name__) |
| 65 | 65 |
| 66 | 66 |
| 67 # FIXME: This class should merge with WebKitPort now that Chromium behaves mostl
y like other webkit ports. | 67 # FIXME: This class should merge with WebKitPort now that Chromium behaves mostl
y like other webkit ports. |
| 68 class Port(object): | 68 class Port(object): |
| 69 """Abstract class for Port-specific hooks for the layout_test package.""" | 69 """Abstract class for Port-specific hooks for the layout_test package.""" |
| 70 | 70 |
| 71 # Subclasses override this. This should indicate the basic implementation | 71 # Subclasses override this. This should indicate the basic implementation |
| 72 # part of the port name, e.g., 'mac', 'win', 'gtk'; there is probably (?) | 72 # part of the port name, e.g., 'mac', 'win', 'gtk'; there is probably (?) |
| (...skipping 1767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1840 | 1840 |
| 1841 def __init__(self, base, args, reference_args=None): | 1841 def __init__(self, base, args, reference_args=None): |
| 1842 self.name = base | 1842 self.name = base |
| 1843 self.base = base | 1843 self.base = base |
| 1844 self.args = args | 1844 self.args = args |
| 1845 self.reference_args = args if reference_args is None else reference_args | 1845 self.reference_args = args if reference_args is None else reference_args |
| 1846 self.tests = set() | 1846 self.tests = set() |
| 1847 | 1847 |
| 1848 def __repr__(self): | 1848 def __repr__(self): |
| 1849 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1849 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
| OLD | NEW |