[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)
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


No differences found