Title: [89412] trunk/Tools
- Revision
- 89412
- Author
- dpra...@chromium.org
- Date
- 2011-06-21 23:37:05 -0700 (Tue, 21 Jun 2011)
Log Message
2011-06-21 Dirk Pranke <dpra...@chromium.org>
Unreviewed, build fix.
Fix crashes in new-run-webkit-tests resulting from the
change to the http_server logic in r89400. Python 2.5
on Mac 10.5 has some weird error paths.
* Scripts/webkitpy/layout_tests/port/http_server_base.py:
* Scripts/webkitpy/common/system/executive.py:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (89411 => 89412)
--- trunk/Tools/ChangeLog 2011-06-22 06:07:08 UTC (rev 89411)
+++ trunk/Tools/ChangeLog 2011-06-22 06:37:05 UTC (rev 89412)
@@ -1,3 +1,13 @@
+2011-06-21 Dirk Pranke <dpra...@chromium.org>
+
+ Unreviewed, build fix.
+ Fix crashes in new-run-webkit-tests resulting from the
+ change to the http_server logic in r89400. Python 2.5
+ on Mac 10.5 has some weird error paths.
+
+ * Scripts/webkitpy/layout_tests/port/http_server_base.py:
+ * Scripts/webkitpy/common/system/executive.py:
+
2011-06-21 MORITA Hajime <morr...@google.com>
Unreviewed, rolling out r89401 and r89403.
Modified: trunk/Tools/Scripts/webkitpy/common/system/executive.py (89411 => 89412)
--- trunk/Tools/Scripts/webkitpy/common/system/executive.py 2011-06-22 06:07:08 UTC (rev 89411)
+++ trunk/Tools/Scripts/webkitpy/common/system/executive.py 2011-06-22 06:37:05 UTC (rev 89412)
@@ -234,8 +234,10 @@
_log.warn("Failed to kill pid %s. Too many EAGAIN errors." % pid)
continue
if e.errno == errno.ESRCH: # The process does not exist.
- _log.warn("Called kill_process with a non-existant pid %s" % pid)
return
+ if e.errno == errno.ECHILD:
+ # Can't wait on a non-child process, but the kill worked.
+ return
raise
def _win32_check_running_pid(self, pid):
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/http_server_base.py (89411 => 89412)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/http_server_base.py 2011-06-22 06:07:08 UTC (rev 89411)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/http_server_base.py 2011-06-22 06:37:05 UTC (rev 89412)
@@ -87,7 +87,7 @@
if self._wait_for_action(self._is_server_running_on_all_ports):
_log.debug("%s successfully started (pid = %d)" % (self._name, self._pid))
else:
- self._stop_running_process()
+ self._stop_running_server()
raise ServerError('Failed to start %s server' % self._name)
def stop(self):
@@ -149,7 +149,7 @@
full_path = self._filesystem.join(folder, file)
self._filesystem.remove(full_path)
- def _wait_for_action(self, action, wait_secs=10.0, sleep_secs=0.05):
+ def _wait_for_action(self, action, wait_secs=20.0, sleep_secs=1.0):
"""Repeat the action for wait_sec or until it succeeds, sleeping for sleep_secs
in between each attempt. Returns whether it succeeded."""
start_time = time.time()
@@ -173,6 +173,12 @@
try:
s.connect(('localhost', port))
_log.debug("Server running on %d" % port)
+ except socket.error, e:
+ # this branch is needed on Mac 10.5 / python 2.5
+ if e.args[0] not in (errno.ECONNREFUSED, errno.ECONNRESET):
+ raise
+ _log.debug("Server NOT running on %d: %s" % (port, e))
+ return False
except IOError, e:
if e.errno not in (errno.ECONNREFUSED, errno.ECONNRESET):
raise
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes