nrwt: clean up server process, webkit driver so chromium can use it
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Apr 2012 22:10:07 +0000 (22:10 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Apr 2012 22:10:07 +0000 (22:10 +0000)
commitd48dc4b0bdfa1e3392b8d3ca97e921069d1183c4
tree3d4c24eecfe572e364cb86c298a212552fa72fef
parent5bf9584c2dda6c0aeebd81a01276b6ba1b213e00
nrwt: clean up server process, webkit driver so chromium can use it
https://bugs.webkit.org/show_bug.cgi?id=84910

Reviewed by Ojan Vafai.

This change moves the "sample a process" logic out of
server_process.py and into a port-specific class (where really
only the mac has an implementation), and also preemptively kills
DRT when a test times out in WebKitDriver (rather than waiting through the
additional delays caused by calling stop() when we would want to
restart the driver generically in worker.py).

These changes will make it possible for the chromium port to
switch over to the stock WebKitDriver implementation, at least
on mac and linux.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.sample_process):
* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort.sample_process):
* Scripts/webkitpy/layout_tests/port/mac_unittest.py:
(test_helper_fails_to_stop):
(test_sample_process):
(test_sample_process.logging_run_command):
(test_sample_process_throws_exception):
(test_sample_process_throws_exception.throwing_run_command):
* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess._log):
(ServerProcess._handle_timeout):
(ServerProcess.stop):
(ServerProcess):
(ServerProcess.kill): Here we add a method to immediately stop
the process rather than trying to shut it down cleanly.
* Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
(TestServerProcess.test_broken_pipe):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitDriver.run_test): Fix an issue where we weren't passing
along any per-test args (only needed for Chromium, but still).
Also, kill the driver immediately if we time out a test.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115377 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/base.py
Tools/Scripts/webkitpy/layout_tests/port/mac.py
Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/server_process.py
Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
Tools/Scripts/webkitpy/layout_tests/port/webkit.py