| OLD | NEW |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 self._keep_process_reference = True | 53 self._keep_process_reference = True |
| 54 self._start_cmd = start_cmd | 54 self._start_cmd = start_cmd |
| 55 | 55 |
| 56 def _stop_running_server(self): | 56 def _stop_running_server(self): |
| 57 # Clean up the pid file. | 57 # Clean up the pid file. |
| 58 if self._pid and not self._executive.check_running_pid(self._pid): | 58 if self._pid and not self._executive.check_running_pid(self._pid): |
| 59 self._filesystem.remove(self._pid_file) | 59 self._filesystem.remove(self._pid_file) |
| 60 return | 60 return |
| 61 | 61 |
| 62 # TODO(burnik): Figure out a cleaner way of stopping wptserve. | 62 # TODO(burnik): Figure out a cleaner way of stopping wptserve. |
| 63 self._executive.interrupt(self._pid) | 63 if self._platform.is_win(): |
| 64 self._executive.kill_process(self._pid) |
| 65 else: |
| 66 self._executive.interrupt(self._pid) |
| 64 | 67 |
| 65 # According to Popen.wait(), this can deadlock when using stdout=PIPE an
d/or stderr=PIPE. | 68 # According to Popen.wait(), this can deadlock when using stdout=PIPE an
d/or stderr=PIPE. |
| 66 # We're using DEVNULL for both so that should not occur. | 69 # We're using DEVNULL for both so that should not occur. |
| 67 self._process.wait() | 70 self._process.wait() |
| OLD | NEW |