Index: Tools/Scripts/webkitpy/layout_tests/controllers/manager.py |
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py |
index 41100e70c5a8da2566c4ebec7da28e03868760fa..65d87254be98b59d5f45472d4ced3664200d2b0d 100644 |
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py |
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py |
@@ -85,6 +85,7 @@ class Manager(object): |
self.LAYOUT_TESTS_DIRECTORY = 'LayoutTests' |
self.ARCHIVED_RESULTS_LIMIT = 25 |
self._http_server_started = False |
+ self._wptserve_started = False |
self._websockets_server_started = False |
self._results_directory = self._port.results_directory() |
@@ -95,12 +96,15 @@ class Manager(object): |
return self._finder.find_tests(self._options, args) |
def _is_http_test(self, test): |
- return self.HTTP_SUBDIR in test or self._is_websocket_test(test) |
+ return test.startswith(self.HTTP_SUBDIR) or self._is_websocket_test(test) |
def _is_inspector_test(self, test): |
return self.INSPECTOR_SUBDIR in test |
def _is_websocket_test(self, test): |
+ if self._port.is_wpt_enabled() and self._port.is_wpt_test(test): |
+ return False |
+ |
return self.WEBSOCKET_SUBDIR in test |
def _http_tests(self, test_names): |
@@ -332,6 +336,11 @@ class Manager(object): |
return self._runner.run_tests(self._expectations, test_inputs, tests_to_skip, num_workers, retrying) |
def _start_servers(self, tests_to_run): |
+ if self._port.is_wpt_enabled() and any(self._port.is_wpt_test(test) for test in tests_to_run): |
+ self._printer.write_update('Starting WPTServe ...') |
+ self._port.start_wptserve() |
+ self._wptserve_started = True |
+ |
if self._port.requires_http_server() or any((self._is_http_test(test) or self._is_inspector_test(test)) for test in tests_to_run): |
self._printer.write_update('Starting HTTP server ...') |
self._port.start_http_server(additional_dirs={}, number_of_drivers=self._options.max_locked_shards) |
@@ -343,6 +352,10 @@ class Manager(object): |
self._websockets_server_started = True |
def _stop_servers(self): |
+ if self._wptserve_started: |
+ self._printer.write_update('Stopping WPTServe ...') |
+ self._wptserve_started = False |
+ self._port.stop_wptserve() |
if self._http_server_started: |
self._printer.write_update('Stopping HTTP server ...') |
self._http_server_started = False |