Changeset 95875 in webkit


Ignore:
Timestamp:
Sep 23, 2011 3:47:24 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[chromium] Make the layout test script's kill timeout proportional to --time-out-ms
https://bugs.webkit.org/show_bug.cgi?id=68026

Patch by Lei Zhang <thestig@chromium.org> on 2011-09-23
Reviewed by Dirk Pranke.

  • Scripts/webkitpy/layout_tests/port/chromium.py:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r95850 r95875  
     12011-09-23  Lei Zhang  <thestig@chromium.org>
     2
     3        [chromium] Make the layout test script's kill timeout proportional to --time-out-ms
     4        https://bugs.webkit.org/show_bug.cgi?id=68026
     5
     6        Reviewed by Dirk Pranke.
     7
     8        * Scripts/webkitpy/layout_tests/port/chromium.py:
     9
    1102011-09-23  Elliot Poger  <epoger@google.com>
    211
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py

    r94031 r95875  
    395395# FIXME: This should inherit from WebKitDriver now that Chromium has a DumpRenderTree process like the rest of WebKit.
    396396class ChromiumDriver(Driver):
    397     KILL_TIMEOUT = 3.0
    398 
    399397    def __init__(self, port, worker_number):
    400398        Driver.__init__(self, port, worker_number)
     
    596594        if self._proc.stderr:
    597595            self._proc.stderr.close()
     596        # The kill timeout was hard coded to 3 seconds given a default
     597        # --time-out-ms of 35 seconds. We divide by 12 to get a close
     598        # approximation.
     599        time_out_ms = self._port.get_option('time_out_ms')
     600        if time_out_ms:
     601          kill_timeout_seconds = int(time_out_ms) / 12000
     602        else:
     603          kill_timeout_seconds = 3.0
     604
    598605        # Closing stdin/stdout/stderr hangs sometimes on OS X,
    599606        # (see __init__(), above), and anyway we don't want to hang
     
    601608        # seconds to give DRT a chance to clean up, but then
    602609        # force-kill the process if necessary.
    603         timeout = time.time() + self.KILL_TIMEOUT
     610        timeout = time.time() + kill_timeout_seconds
    604611        while self._proc.poll() is None and time.time() < timeout:
    605612            time.sleep(0.1)
Note: See TracChangeset for help on using the changeset viewer.