Changeset 139697 in webkit
- Timestamp:
- Jan 14, 2013 5:40:54 PM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r139689 r139697 1 2013-01-14 Dirk Pranke <dpranke@chromium.org> 2 3 kill whole lighttpd process tree for chromium win 4 https://bugs.webkit.org/show_bug.cgi?id=106838 5 6 Reviewed by Tony Chang. 7 8 Land a speculative fix for lighttpd.exe hanging on some chromium bots; 9 I think a test is causing a httpd server child process to wedge and 10 killing the parent httpd server process isn't sufficient to ensure 11 that the children are also killed. 12 13 * Scripts/webkitpy/layout_tests/servers/http_server.py: 14 (Lighttpd._check_and_kill): 15 * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py: 16 (TestHttpServer.test_start_cmd): 17 (TestHttpServer): 18 (TestHttpServer.test_win32_start_and_stop): 19 (TestHttpServer.test_win32_start_and_stop.wait_for_action): 20 (TestHttpServer.test_win32_start_and_stop.mock_returns): 21 (TestHttpServer.test_win32_start_and_stop.mock_returns.return_value_thunk): 22 1 23 2013-01-14 Nico Weber <thakis@chromium.org> 2 24 -
trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py
r136545 r139697 215 215 def _check_and_kill(self): 216 216 if self._executive.check_running_pid(self._pid): 217 self._executive.kill_process(self._pid) 217 host = self._port_obj.host 218 if host.platform.is_win() and not host.platform.is_cygwin(): 219 # FIXME: https://bugs.webkit.org/show_bug.cgi?id=106838 220 # We need to kill all of the child processes as well as the 221 # parent, so we can't use executive.kill_process(). 222 # 223 # If this is actually working, we should figure out a clean API. 224 self._executive.run_command(["taskkill.exe", "/f", "/t", self._pid], error_handler=self._executive.ignore_error) 225 else: 226 self._executive.kill_process(self._pid) 218 227 return False 219 228 return True -
trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py
r134636 r139697 27 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 28 29 import unittest30 29 import re 31 30 import sys 31 import unittest 32 32 33 33 from webkitpy.common.host_mock import MockHost … … 63 63 'alias.url += ( "/media-resources" => "/test.checkout/LayoutTests/media" )', 64 64 ]) 65 66 def test_win32_start_and_stop(self): 67 host = MockHost() 68 test_port = test.TestPort(host) 69 host.filesystem.write_text_file( 70 "/mock-checkout/Tools/Scripts/webkitpy/layout_tests/servers/lighttpd.conf", "Mock Config\n") 71 host.filesystem.write_text_file( 72 "/usr/lib/lighttpd/liblightcomp.dylib", "Mock dylib") 73 74 host.platform.is_win = lambda: True 75 host.platform.is_cygwin = lambda: False 76 77 server = Lighttpd(test_port, "/mock/output_dir", 78 additional_dirs={ 79 "/mock/one-additional-dir": "/mock-checkout/one-additional-dir", 80 "/mock/another-additional-dir": "/mock-checkout/one-additional-dir"}) 81 server._is_server_running_on_all_ports = lambda: True 82 83 server.start() 84 self.assertNotEquals(host.executive.calls, []) 85 86 def wait_for_action(action): 87 if action(): 88 return True 89 return action() 90 91 def mock_returns(return_values): 92 def return_value_thunk(*args, **kwargs): 93 return return_values.pop(0) 94 return return_value_thunk 95 96 host.executive.check_running_pid = mock_returns([True, False]) 97 server._wait_for_action = wait_for_action 98 99 server.stop() 100 self.assertEquals(['taskkill.exe', '/f', '/t', 42], host.executive.calls[1])
Note: See TracChangeset
for help on using the changeset viewer.