Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py

Issue 2004463002: Move remaining files from web-platform-tests/ and update remaining paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update paths in webkitpy/layout_tests/servers/. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Start and stop the WPTserve servers as they're used by the layout tests.""" 5 """Start and stop the WPTserve servers as they're used by the layout tests."""
6 6
7 from webkitpy.layout_tests.servers import server_base 7 from webkitpy.layout_tests.servers import server_base
8 8
9 9
10 class WPTServe(server_base.ServerBase): 10 class WPTServe(server_base.ServerBase):
(...skipping 12 matching lines...) Expand all
23 {'port': wss_port, 'sslcert': True}] 23 {'port': wss_port, 'sslcert': True}]
24 24
25 # TODO(burnik): We can probably avoid PID files for WPT in the future. 25 # TODO(burnik): We can probably avoid PID files for WPT in the future.
26 fs = self._filesystem 26 fs = self._filesystem
27 self._pid_file = fs.join(self._runtime_path, '%s.pid' % self._name) 27 self._pid_file = fs.join(self._runtime_path, '%s.pid' % self._name)
28 28
29 path_to_thirdparty = self._port_obj.path_from_webkit_base('Tools', 'Scri pts', 'webkitpy', 'thirdparty') 29 path_to_thirdparty = self._port_obj.path_from_webkit_base('Tools', 'Scri pts', 'webkitpy', 'thirdparty')
30 path_to_wpt_support = self._port_obj.path_from_webkit_base('Tools', 'Scr ipts', 'webkitpy', 'thirdparty', 'wpt') 30 path_to_wpt_support = self._port_obj.path_from_webkit_base('Tools', 'Scr ipts', 'webkitpy', 'thirdparty', 'wpt')
31 path_to_wpt_root = fs.join(path_to_wpt_support, 'wpt') 31 path_to_wpt_root = fs.join(path_to_wpt_support, 'wpt')
32 path_to_wpt_config = fs.join(path_to_wpt_support, 'wpt.config.json') 32 path_to_wpt_config = fs.join(path_to_wpt_support, 'wpt.config.json')
33 path_to_wpt_tests = fs.abspath(fs.join(self._port_obj.layout_tests_dir() , 'imported', 'web-platform-tests')) 33 path_to_wpt_tests = fs.abspath(fs.join(self._port_obj.layout_tests_dir() , 'imported', 'wpt'))
34 path_to_ws_handlers = fs.join(path_to_wpt_tests, 'websockets', 'handlers ') 34 path_to_ws_handlers = fs.join(path_to_wpt_tests, 'websockets', 'handlers ')
35 serve_script = fs.join(path_to_wpt_root, 'serve') 35 serve_script = fs.join(path_to_wpt_root, 'serve')
36 start_cmd = [self._port_obj.host.executable, 36 start_cmd = [self._port_obj.host.executable,
37 '-u', serve_script, 37 '-u', serve_script,
38 '--config', path_to_wpt_config, 38 '--config', path_to_wpt_config,
39 '--doc_root', path_to_wpt_tests] 39 '--doc_root', path_to_wpt_tests]
40 40
41 # TODO(burnik): Merge with default start_cmd once we roll in websockets. 41 # TODO(burnik): Merge with default start_cmd once we roll in websockets.
42 if self._port_obj.host.filesystem.exists(path_to_ws_handlers): 42 if self._port_obj.host.filesystem.exists(path_to_ws_handlers):
43 start_cmd += ['--ws_doc_root', path_to_ws_handlers] 43 start_cmd += ['--ws_doc_root', path_to_ws_handlers]
(...skipping 10 matching lines...) Expand all
54 if self._pid and not self._executive.check_running_pid(self._pid): 54 if self._pid and not self._executive.check_running_pid(self._pid):
55 self._filesystem.remove(self._pid_file) 55 self._filesystem.remove(self._pid_file)
56 return 56 return
57 57
58 # TODO(burnik): Figure out a cleaner way of stopping wptserve. 58 # TODO(burnik): Figure out a cleaner way of stopping wptserve.
59 self._executive.interrupt(self._pid) 59 self._executive.interrupt(self._pid)
60 60
61 # According to Popen.wait(), this can deadlock when using stdout=PIPE an d/or stderr=PIPE. 61 # According to Popen.wait(), this can deadlock when using stdout=PIPE an d/or stderr=PIPE.
62 # We're using DEVNULL for both so that should not occur. 62 # We're using DEVNULL for both so that should not occur.
63 self._process.wait() 63 self._process.wait()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698