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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 pywebsocket_base = path_utils.path_from_base( | 119 pywebsocket_base = path_utils.path_from_base( |
120 'third_party', 'WebKit', 'WebKitTools', 'pywebsocket') | 120 'third_party', 'WebKit', 'WebKitTools', 'pywebsocket') |
121 pywebsocket_script = path_utils.path_from_base( | 121 pywebsocket_script = path_utils.path_from_base( |
122 'third_party', 'WebKit', 'WebKitTools', 'pywebsocket', | 122 'third_party', 'WebKit', 'WebKitTools', 'pywebsocket', |
123 'mod_pywebsocket', 'standalone.py') | 123 'mod_pywebsocket', 'standalone.py') |
124 start_cmd = [ | 124 start_cmd = [ |
125 python_interp, pywebsocket_script, | 125 python_interp, pywebsocket_script, |
126 '-p', str(self._port), | 126 '-p', str(self._port), |
127 '-d', self._layout_tests, | 127 '-d', self._layout_tests, |
128 '-s', self._web_socket_tests, | 128 '-s', self._web_socket_tests, |
| 129 '-x', '/websocket/tests/cookies', |
129 '-l', error_log, | 130 '-l', error_log, |
130 ] | 131 ] |
131 | 132 |
132 handler_map_file = os.path.join(self._web_socket_tests, | 133 handler_map_file = os.path.join(self._web_socket_tests, |
133 'handler_map.txt') | 134 'handler_map.txt') |
134 if os.path.exists(handler_map_file): | 135 if os.path.exists(handler_map_file): |
135 logging.debug('Using handler_map_file: %s' % handler_map_file) | 136 logging.debug('Using handler_map_file: %s' % handler_map_file) |
136 start_cmd.append('-m') | 137 start_cmd.append('-m') |
137 start_cmd.append(handler_map_file) | 138 start_cmd.append(handler_map_file) |
138 else: | 139 else: |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 kwds['register_cygwin'] = options.register_cygwin | 261 kwds['register_cygwin'] = options.register_cygwin |
261 if options.pidfile: | 262 if options.pidfile: |
262 kwds['pidfile'] = options.pidfile | 263 kwds['pidfile'] = options.pidfile |
263 | 264 |
264 pywebsocket = PyWebSocket(tempfile.gettempdir(), **kwds) | 265 pywebsocket = PyWebSocket(tempfile.gettempdir(), **kwds) |
265 | 266 |
266 if 'start' == options.server: | 267 if 'start' == options.server: |
267 pywebsocket.start() | 268 pywebsocket.start() |
268 else: | 269 else: |
269 pywebsocket.stop(force=True) | 270 pywebsocket.stop(force=True) |
OLD | NEW |