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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 from webkitpy.common import read_checksum_from_png | 52 from webkitpy.common import read_checksum_from_png |
53 from webkitpy.common.memoized import memoized | 53 from webkitpy.common.memoized import memoized |
54 from webkitpy.common.system import path | 54 from webkitpy.common.system import path |
55 from webkitpy.common.system.executive import ScriptError | 55 from webkitpy.common.system.executive import ScriptError |
56 from webkitpy.common.system.path import cygpath | 56 from webkitpy.common.system.path import cygpath |
57 from webkitpy.common.system.systemhost import SystemHost | 57 from webkitpy.common.system.systemhost import SystemHost |
58 from webkitpy.common.webkit_finder import WebKitFinder | 58 from webkitpy.common.webkit_finder import WebKitFinder |
59 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory | 59 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory |
60 from webkitpy.layout_tests.models import test_run_results | 60 from webkitpy.layout_tests.models import test_run_results |
61 from webkitpy.layout_tests.models.test_configuration import TestConfiguration | 61 from webkitpy.layout_tests.models.test_configuration import TestConfiguration |
62 from webkitpy.layout_tests.port import config as port_config | |
63 from webkitpy.layout_tests.port import driver | 62 from webkitpy.layout_tests.port import driver |
64 from webkitpy.layout_tests.port import server_process | 63 from webkitpy.layout_tests.port import server_process |
65 from webkitpy.layout_tests.port.factory import PortFactory | 64 from webkitpy.layout_tests.port.factory import PortFactory |
66 from webkitpy.layout_tests.servers import apache_http | 65 from webkitpy.layout_tests.servers import apache_http |
67 from webkitpy.layout_tests.servers import pywebsocket | 66 from webkitpy.layout_tests.servers import pywebsocket |
68 from webkitpy.layout_tests.servers import wptserve | 67 from webkitpy.layout_tests.servers import wptserve |
69 | 68 |
70 _log = logging.getLogger(__name__) | 69 _log = logging.getLogger(__name__) |
71 | 70 |
72 | 71 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 168 |
170 # FIXME: Ideally we'd have a package-wide way to get a | 169 # FIXME: Ideally we'd have a package-wide way to get a |
171 # well-formed options object that had all of the necessary | 170 # well-formed options object that had all of the necessary |
172 # options defined on it. | 171 # options defined on it. |
173 self._options = options or optparse.Values() | 172 self._options = options or optparse.Values() |
174 | 173 |
175 self.host = host | 174 self.host = host |
176 self._executive = host.executive | 175 self._executive = host.executive |
177 self._filesystem = host.filesystem | 176 self._filesystem = host.filesystem |
178 self._webkit_finder = WebKitFinder(host.filesystem) | 177 self._webkit_finder = WebKitFinder(host.filesystem) |
179 self._config = port_config.Config(self._executive, self._filesystem, sel
f.port_name) | |
180 | 178 |
181 self._helper = None | 179 self._helper = None |
182 self._http_server = None | 180 self._http_server = None |
183 self._websocket_server = None | 181 self._websocket_server = None |
184 self._is_wpt_enabled = hasattr(options, 'enable_wptserve') and options.e
nable_wptserve | 182 self._is_wpt_enabled = hasattr(options, 'enable_wptserve') and options.e
nable_wptserve |
185 self._wpt_server = None | 183 self._wpt_server = None |
186 self._image_differ = None | 184 self._image_differ = None |
187 self._server_process_constructor = server_process.ServerProcess # overr
idable for testing | 185 self._server_process_constructor = server_process.ServerProcess # overr
idable for testing |
188 self._http_lock = None # FIXME: Why does this live on the port object? | 186 self._http_lock = None # FIXME: Why does this live on the port object? |
189 self._dump_reader = None | 187 self._dump_reader = None |
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 _log.error("Failed to run PrettyPatch (%s): %s" % (command, e)) | 1412 _log.error("Failed to run PrettyPatch (%s): %s" % (command, e)) |
1415 return self._pretty_patch_error_html | 1413 return self._pretty_patch_error_html |
1416 except ScriptError, e: | 1414 except ScriptError, e: |
1417 # If ruby failed to run for some reason, log the command | 1415 # If ruby failed to run for some reason, log the command |
1418 # output and stop trying. | 1416 # output and stop trying. |
1419 self._pretty_patch_available = False | 1417 self._pretty_patch_available = False |
1420 _log.error("Failed to run PrettyPatch (%s):\n%s" % (command, e.messa
ge_with_output())) | 1418 _log.error("Failed to run PrettyPatch (%s):\n%s" % (command, e.messa
ge_with_output())) |
1421 return self._pretty_patch_error_html | 1419 return self._pretty_patch_error_html |
1422 | 1420 |
1423 def default_configuration(self): | 1421 def default_configuration(self): |
1424 return self._config.default_configuration() | 1422 return 'Release' |
1425 | 1423 |
1426 def clobber_old_port_specific_results(self): | 1424 def clobber_old_port_specific_results(self): |
1427 pass | 1425 pass |
1428 | 1426 |
1429 # FIXME: This does not belong on the port object. | 1427 # FIXME: This does not belong on the port object. |
1430 @memoized | 1428 @memoized |
1431 def path_to_apache(self): | 1429 def path_to_apache(self): |
1432 """Returns the full path to the apache binary. | 1430 """Returns the full path to the apache binary. |
1433 | 1431 |
1434 This is needed only by ports that use the apache_http_server module.""" | 1432 This is needed only by ports that use the apache_http_server module.""" |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1782 | 1780 |
1783 def __init__(self, base, args, reference_args=None): | 1781 def __init__(self, base, args, reference_args=None): |
1784 self.name = base | 1782 self.name = base |
1785 self.base = base | 1783 self.base = base |
1786 self.args = args | 1784 self.args = args |
1787 self.reference_args = args if reference_args is None else reference_args | 1785 self.reference_args = args if reference_args is None else reference_args |
1788 self.tests = set() | 1786 self.tests = set() |
1789 | 1787 |
1790 def __repr__(self): | 1788 def __repr__(self): |
1791 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) | 1789 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base,
self.args, self.reference_args) |
OLD | NEW |