Changeset 55388 in webkit
- Timestamp:
- Mar 1, 2010 5:07:09 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r55384 r55388 1 2010-03-01 Dirk Pranke <dpranke@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Work around a bug in Python's subprocess.Popen() that keeps us from 6 cleaning up DumpRenderTree / test_shell properly when we finish the 7 tests in new-run-webkit-tests. 8 9 https://bugs.webkit.org/show_bug.cgi?id=35553 10 11 * Scripts/webkitpy/layout_tests/port/chromium.py: 12 * Scripts/webkitpy/layout_tests/port/mac.py: 13 1 14 2010-03-01 Arno Renevier <arno@renevier.net> 2 15 -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
r55382 r55388 228 228 if options: 229 229 cmd += options 230 231 # We need to pass close_fds=True to work around Python bug #2320 232 # (otherwise we can hang when we kill test_shell when we are running 233 # multiple threads). See http://bugs.python.org/issue2320 . 230 234 self._proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, 231 235 stdout=subprocess.PIPE, 232 stderr=subprocess.STDOUT )233 236 stderr=subprocess.STDOUT, 237 close_fds=True) 234 238 def poll(self): 235 239 return self._proc.poll() … … 300 304 if self._proc.stderr: 301 305 self._proc.stderr.close() 302 if (sys.platform not in ('win32', 'cygwin') and 303 not self._proc.poll()): 304 # Closing stdin/stdout/stderr hangs sometimes on OS X. 305 null = open(os.devnull, "w") 306 subprocess.Popen(["kill", "-9", 307 str(self._proc.pid)], stderr=null) 308 null.close() 306 if sys.platform not in ('win32', 'cygwin'): 307 # Closing stdin/stdout/stderr hangs sometimes on OS X, 308 # (see __init__(), above), and anyway we don't want to hang 309 # the harness if test_shell is buggy, so we wait a couple 310 # seconds to give test_shell a chance to clean up, but then 311 # force-kill the process if necessary. 312 KILL_TIMEOUT = 3.0 313 timeout = time.time() + KILL_TIMEOUT 314 while self._proc.poll() is None and time.time() < timeout: 315 time.sleep(0.1) 316 if self._proc.poll() is None: 317 logging.warning('stopping test driver timed out, ' 318 'killing it') 319 null = open(os.devnull, "w") 320 subprocess.Popen(["kill", "-9", 321 str(self._proc.pid)], stderr=null) 322 null.close() -
trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/mac.py
r55373 r55388 322 322 def restart(self): 323 323 self.stop() 324 # We need to pass close_fds=True to work around Python bug #2320 325 # (otherwise we can hang when we kill test_shell when we are running 326 # multiple threads). See http://bugs.python.org/issue2320 . 324 327 self._proc = subprocess.Popen(self._cmd, stdin=subprocess.PIPE, 325 328 stdout=subprocess.PIPE, 326 329 stderr=subprocess.PIPE, 327 env=self._env) 330 env=self._env, 331 close_fds=True) 328 332 329 333 def returncode(self): … … 426 430 if self._proc.stderr: 427 431 self._proc.stderr.close() 428 if (sys.platform not in ('win32', 'cygwin') and 429 not self._proc.poll()): 430 # Closing stdin/stdout/stderr hangs sometimes on OS X. 431 null = open(os.devnull, "w") 432 subprocess.Popen(["kill", "-9", 433 str(self._proc.pid)], stderr=null) 434 null.close() 432 if sys.platform not in ('win32', 'cygwin'): 433 # Closing stdin/stdout/stderr hangs sometimes on OS X, 434 # (see restart(), above), and anyway we don't want to hang 435 # the harness if test_shell is buggy, so we wait a couple 436 # seconds to give test_shell a chance to clean up, but then 437 # force-kill the process if necessary. 438 KILL_TIMEOUT = 3.0 439 timeout = time.time() + KILL_TIMEOUT 440 while self._proc.poll() is None and time.time() < timeout: 441 time.sleep(0.1) 442 if self._proc.poll() is None: 443 logging.warning('stopping test driver timed out, ' 444 'killing it') 445 null = open(os.devnull, "w") 446 subprocess.Popen(["kill", "-9", 447 str(self._proc.pid)], stderr=null) 448 null.close() not self._proc.poll()): 435 449 436 450 def _read_line(self, timeout, stop_time, image_length=0):
Note: See TracChangeset
for help on using the changeset viewer.