OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """A class to help start/stop the PyWebSocket server used by layout tests.""" | 6 """A class to help start/stop the PyWebSocket server used by layout tests.""" |
7 | 7 |
8 | 8 |
9 import logging | 9 import logging |
10 import optparse | 10 import optparse |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 'thirdparty', 'pywebsocket') | 121 'thirdparty', 'pywebsocket') |
122 pywebsocket_script = path_utils.path_from_base( | 122 pywebsocket_script = path_utils.path_from_base( |
123 'third_party', 'WebKit', 'WebKitTools', 'Scripts', | 123 'third_party', 'WebKit', 'WebKitTools', 'Scripts', |
124 'webkitpy', 'thirdparty', 'pywebsocket', 'mod_pywebsocket', | 124 'webkitpy', 'thirdparty', 'pywebsocket', 'mod_pywebsocket', |
125 'standalone.py') | 125 'standalone.py') |
126 start_cmd = [ | 126 start_cmd = [ |
127 python_interp, pywebsocket_script, | 127 python_interp, pywebsocket_script, |
128 '-p', str(self._port), | 128 '-p', str(self._port), |
129 '-d', self._layout_tests, | 129 '-d', self._layout_tests, |
130 '-s', self._web_socket_tests, | 130 '-s', self._web_socket_tests, |
| 131 '-x', '/websocket/tests/cookies', |
131 '-l', error_log, | 132 '-l', error_log, |
132 ] | 133 ] |
133 | 134 |
134 handler_map_file = os.path.join(self._web_socket_tests, | 135 handler_map_file = os.path.join(self._web_socket_tests, |
135 'handler_map.txt') | 136 'handler_map.txt') |
136 if os.path.exists(handler_map_file): | 137 if os.path.exists(handler_map_file): |
137 logging.debug('Using handler_map_file: %s' % handler_map_file) | 138 logging.debug('Using handler_map_file: %s' % handler_map_file) |
138 start_cmd.append('-m') | 139 start_cmd.append('-m') |
139 start_cmd.append(handler_map_file) | 140 start_cmd.append(handler_map_file) |
140 else: | 141 else: |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 kwds['register_cygwin'] = options.register_cygwin | 263 kwds['register_cygwin'] = options.register_cygwin |
263 if options.pidfile: | 264 if options.pidfile: |
264 kwds['pidfile'] = options.pidfile | 265 kwds['pidfile'] = options.pidfile |
265 | 266 |
266 pywebsocket = PyWebSocket(tempfile.gettempdir(), **kwds) | 267 pywebsocket = PyWebSocket(tempfile.gettempdir(), **kwds) |
267 | 268 |
268 if 'start' == options.server: | 269 if 'start' == options.server: |
269 pywebsocket.start() | 270 pywebsocket.start() |
270 else: | 271 else: |
271 pywebsocket.stop(force=True) | 272 pywebsocket.stop(force=True) |
OLD | NEW |