[nrwt] handle corrupt http server pid files cleanly
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2013 20:58:57 +0000 (20:58 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Mar 2013 20:58:57 +0000 (20:58 +0000)
commitfa374e527de06c420466a6491bc44d76d67abc03
tree69ee1cb6d2a5b94521fc4b697b27cca7684e5780
parent36a7d6f72b1f9eddddbd4cf5b7b296c86c12118b
[nrwt] handle corrupt http server pid files cleanly
https://bugs.webkit.org/show_bug.cgi?id=111628

Reviewed by Eric Seidel.

If the pid file from a previous http server is corrupt for some
reason, NRWT will just raise errors and not clean it up or recover.
This patch fixes that to at least delete the pid file and
not throw; not that we may still have stale http servers left on
the system, since there's no way to know which pid to kill if
the file was corrupted.

* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase.start):
(HttpServerBase.stop):
(HttpServerBase._remove_pid_file):
* Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py: Added.
(TestHttpServerBase):
(TestHttpServerBase.test_corrupt_pid_file):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py
Tools/Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py [new file with mode: 0644]