summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py')
-rw-r--r--WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py25
1 files changed, 6 insertions, 19 deletions
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py
index ad557bd..22ae780 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/port/websocket_server.py
@@ -46,6 +46,8 @@ import factory
import http_server
from webkitpy.common.system.executive import Executive
+from webkitpy.thirdparty.autoinstalled.pywebsocket import mod_pywebsocket
+
_log = logging.getLogger("webkitpy.layout_tests.port.websocket_server")
@@ -95,15 +97,13 @@ class PyWebSocket(http_server.Lighttpd):
def __init__(self, port_obj, output_dir, port=_DEFAULT_WS_PORT,
root=None, use_tls=False,
- register_cygwin=True,
pidfile=None):
"""Args:
output_dir: the absolute path to the layout test result directory
"""
http_server.Lighttpd.__init__(self, port_obj, output_dir,
port=_DEFAULT_WS_PORT,
- root=root,
- register_cygwin=register_cygwin)
+ root=root)
self._output_dir = output_dir
self._process = None
self._port = port
@@ -159,7 +159,8 @@ class PyWebSocket(http_server.Lighttpd):
python_interp = sys.executable
pywebsocket_base = os.path.join(
os.path.dirname(os.path.dirname(os.path.dirname(
- os.path.abspath(__file__)))), 'thirdparty', 'pywebsocket')
+ os.path.abspath(__file__)))), 'thirdparty',
+ 'autoinstalled', 'pywebsocket')
pywebsocket_script = os.path.join(pywebsocket_base, 'mod_pywebsocket',
'standalone.py')
start_cmd = [
@@ -185,21 +186,7 @@ class PyWebSocket(http_server.Lighttpd):
start_cmd.extend(['-t', '-k', self._private_key,
'-c', self._certificate])
- # Put the cygwin directory first in the path to find cygwin1.dll
- env = os.environ
- if sys.platform in ('cygwin', 'win32'):
- env['PATH'] = '%s;%s' % (
- self._port_obj.path_from_chromium_base('third_party',
- 'cygwin', 'bin'),
- env['PATH'])
- env['CYGWIN_PATH'] = self._port_obj.path_from_chromium_base(
- 'third_party', 'cygwin', 'bin')
-
- if sys.platform == 'win32' and self._register_cygwin:
- setup_mount = self._port_obj.path_from_chromium_base(
- 'third_party', 'cygwin', 'setup_mount.bat')
- subprocess.Popen(setup_mount).wait()
-
+ env = self._port_obj.setup_environ_for_server()
env['PYTHONPATH'] = (pywebsocket_base + os.path.pathsep +
env.get('PYTHONPATH', ''))