| OLD | NEW |
| 1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 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 15 matching lines...) Expand all Loading... |
| 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 """A class to help start/stop the PyWebSocket server as used by the layout tests
.""" | 29 """A class to help start/stop the PyWebSocket server as used by the layout tests
.""" |
| 30 | 30 |
| 31 import os | 31 import os |
| 32 import sys | 32 import sys |
| 33 import time | 33 import time |
| 34 | 34 |
| 35 from webkitpy.layout_tests.servers import server_base | 35 from webkitpy.layout_tests.servers import server_base |
| 36 from webkitpy.thirdparty import mod_pywebsocket | |
| 37 | 36 |
| 38 | 37 |
| 39 _WS_LOG_PREFIX = 'pywebsocket.ws.log-' | 38 _WS_LOG_PREFIX = 'pywebsocket.ws.log-' |
| 40 | 39 |
| 41 _DEFAULT_WS_PORT = 8880 | 40 _DEFAULT_WS_PORT = 8880 |
| 42 | 41 |
| 43 | 42 |
| 44 class PyWebSocket(server_base.ServerBase): | 43 class PyWebSocket(server_base.ServerBase): |
| 45 | 44 |
| 46 def __init__(self, port_obj, output_dir): | 45 def __init__(self, port_obj, output_dir): |
| (...skipping 18 matching lines...) Expand all Loading... |
| 65 '--port', str(self._port), | 64 '--port', str(self._port), |
| 66 '--document-root', self._web_socket_tests, | 65 '--document-root', self._web_socket_tests, |
| 67 '--scan-dir', self._web_socket_tests, | 66 '--scan-dir', self._web_socket_tests, |
| 68 '--cgi-paths', '/', | 67 '--cgi-paths', '/', |
| 69 '--log-file', self._error_log, | 68 '--log-file', self._error_log, |
| 70 '--websock-handlers-map-file', self._filesystem.join(self._web_socke
t_tests, 'handler_map.txt'), | 69 '--websock-handlers-map-file', self._filesystem.join(self._web_socke
t_tests, 'handler_map.txt'), |
| 71 ] | 70 ] |
| 72 # TODO(burnik): Check if this is really needed (and why). If not, just s
et PYTHONPATH. | 71 # TODO(burnik): Check if this is really needed (and why). If not, just s
et PYTHONPATH. |
| 73 self._env = self._port_obj.setup_environ_for_server() | 72 self._env = self._port_obj.setup_environ_for_server() |
| 74 self._env['PYTHONPATH'] = (pywebsocket_base + os.pathsep + self._env.get
('PYTHONPATH', '')) | 73 self._env['PYTHONPATH'] = (pywebsocket_base + os.pathsep + self._env.get
('PYTHONPATH', '')) |
| OLD | NEW |