| 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.memoized import memoized | 52 from webkitpy.common.memoized import memoized |
| 53 from webkitpy.common.system import path | 53 from webkitpy.common.system import path |
| 54 from webkitpy.common.system.executive import ScriptError | 54 from webkitpy.common.system.executive import ScriptError |
| 55 from webkitpy.common.system.path import cygpath | 55 from webkitpy.common.system.path import cygpath |
| 56 from webkitpy.common.system.systemhost import SystemHost | 56 from webkitpy.common.system.systemhost import SystemHost |
| 57 from webkitpy.common.webkit_finder import WebKitFinder | 57 from webkitpy.common.webkit_finder import WebKitFinder |
| 58 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory | 58 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory |
| 59 from webkitpy.layout_tests.models.test_configuration import TestConfiguration | 59 from webkitpy.layout_tests.models.test_configuration import TestConfiguration |
| 60 from webkitpy.layout_tests.port import config as port_config | 60 from webkitpy.layout_tests.port import config as port_config |
| 61 from webkitpy.layout_tests.port import driver | 61 from webkitpy.layout_tests.port import driver |
| 62 from webkitpy.layout_tests.port import http_lock | |
| 63 from webkitpy.layout_tests.port import server_process | 62 from webkitpy.layout_tests.port import server_process |
| 64 from webkitpy.layout_tests.port.factory import PortFactory | 63 from webkitpy.layout_tests.port.factory import PortFactory |
| 65 from webkitpy.layout_tests.servers import apache_http_server | 64 from webkitpy.layout_tests.servers import apache_http_server |
| 66 from webkitpy.layout_tests.servers import http_server | 65 from webkitpy.layout_tests.servers import http_server |
| 67 from webkitpy.layout_tests.servers import websocket_server | 66 from webkitpy.layout_tests.servers import websocket_server |
| 68 | 67 |
| 69 _log = logging.getLogger(__name__) | 68 _log = logging.getLogger(__name__) |
| 70 | 69 |
| 71 | 70 |
| 72 # FIXME: This class should merge with WebKitPort now that Chromium behaves mostl
y like other webkit ports. | 71 # FIXME: This class should merge with WebKitPort now that Chromium behaves mostl
y like other webkit ports. |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 server.start() | 948 server.start() |
| 950 self._websocket_server = server | 949 self._websocket_server = server |
| 951 | 950 |
| 952 def http_server_supports_ipv6(self): | 951 def http_server_supports_ipv6(self): |
| 953 # Cygwin is the only platform to still use Apache 1.3, which only suppor
ts IPV4. | 952 # Cygwin is the only platform to still use Apache 1.3, which only suppor
ts IPV4. |
| 954 # Once it moves to Apache 2, we can drop this method altogether. | 953 # Once it moves to Apache 2, we can drop this method altogether. |
| 955 if self.host.platform.is_cygwin(): | 954 if self.host.platform.is_cygwin(): |
| 956 return False | 955 return False |
| 957 return True | 956 return True |
| 958 | 957 |
| 959 def acquire_http_lock(self): | |
| 960 self._http_lock = http_lock.HttpLock(None, filesystem=self._filesystem,
executive=self._executive) | |
| 961 self._http_lock.wait_for_httpd_lock() | |
| 962 | |
| 963 def stop_helper(self): | 958 def stop_helper(self): |
| 964 """Shut down the test helper if it is running. Do nothing if | 959 """Shut down the test helper if it is running. Do nothing if |
| 965 it isn't, or it isn't available. If a port overrides start_helper() | 960 it isn't, or it isn't available. If a port overrides start_helper() |
| 966 it must override this routine as well.""" | 961 it must override this routine as well.""" |
| 967 pass | 962 pass |
| 968 | 963 |
| 969 def stop_http_server(self): | 964 def stop_http_server(self): |
| 970 """Shut down the http server if it is running. Do nothing if it isn't.""
" | 965 """Shut down the http server if it is running. Do nothing if it isn't.""
" |
| 971 if self._http_server: | 966 if self._http_server: |
| 972 self._http_server.stop() | 967 self._http_server.stop() |
| 973 self._http_server = None | 968 self._http_server = None |
| 974 | 969 |
| 975 def stop_websocket_server(self): | 970 def stop_websocket_server(self): |
| 976 """Shut down the websocket server if it is running. Do nothing if it isn
't.""" | 971 """Shut down the websocket server if it is running. Do nothing if it isn
't.""" |
| 977 if self._websocket_server: | 972 if self._websocket_server: |
| 978 self._websocket_server.stop() | 973 self._websocket_server.stop() |
| 979 self._websocket_server = None | 974 self._websocket_server = None |
| 980 | 975 |
| 981 def release_http_lock(self): | |
| 982 if self._http_lock: | |
| 983 self._http_lock.cleanup_http_lock() | |
| 984 | |
| 985 def exit_code_from_summarized_results(self, unexpected_results): | 976 def exit_code_from_summarized_results(self, unexpected_results): |
| 986 """Given summarized results, compute the exit code to be returned by new
-run-webkit-tests. | 977 """Given summarized results, compute the exit code to be returned by new
-run-webkit-tests. |
| 987 Bots turn red when this function returns a non-zero value. By default, r
eturn the number of regressions | 978 Bots turn red when this function returns a non-zero value. By default, r
eturn the number of regressions |
| 988 to avoid turning bots red by flaky failures, unexpected passes, and miss
ing results""" | 979 to avoid turning bots red by flaky failures, unexpected passes, and miss
ing results""" |
| 989 # Don't turn bots red for flaky failures, unexpected passes, and missing
results. | 980 # Don't turn bots red for flaky failures, unexpected passes, and missing
results. |
| 990 return unexpected_results['num_regressions'] | 981 return unexpected_results['num_regressions'] |
| 991 | 982 |
| 992 # | 983 # |
| 993 # TEST EXPECTATION-RELATED METHODS | 984 # TEST EXPECTATION-RELATED METHODS |
| 994 # | 985 # |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1440 | 1431 |
| 1441 class VirtualTestSuite(object): | 1432 class VirtualTestSuite(object): |
| 1442 def __init__(self, name, base, args, tests=None): | 1433 def __init__(self, name, base, args, tests=None): |
| 1443 self.name = name | 1434 self.name = name |
| 1444 self.base = base | 1435 self.base = base |
| 1445 self.args = args | 1436 self.args = args |
| 1446 self.tests = tests or set() | 1437 self.tests = tests or set() |
| 1447 | 1438 |
| 1448 def __repr__(self): | 1439 def __repr__(self): |
| 1449 return "VirtualTestSuite('%s', '%s', %s)" % (self.name, self.base, self.
args) | 1440 return "VirtualTestSuite('%s', '%s', %s)" % (self.name, self.base, self.
args) |
| OLD | NEW |