From cb917877b4f8918038ecc1cea355020d70a3a0e8 Mon Sep 17 00:00:00 2001 From: "ap@apple.com" Date: Thu, 16 Apr 2015 22:54:46 +0000 Subject: [PATCH] It is very hard to attach a debugger to WebProcess to debug tests https://bugs.webkit.org/show_bug.cgi?id=143837 Reviewed by Chris Dumez. --no-timeout used to only affect waitUntilDone timeout, but not IPC timeout in WebKitTestRunner, and not pipe reading timeout in run-webkit-tests. Now it disables all timeouts in tools, as is best for debugging tests. * Scripts/webkitpy/port/driver.py: (Driver.run_test): Respect --no-timeout, so that the script doesn't terminate DRT/WKTR when there is no output for a long time. * WebKitTestRunner/Options.cpp: Removed --no-timeout-at-all, as --no-timeout now has the same functionality. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182916 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Tools/ChangeLog | 18 ++++++++++++++++++ Tools/Scripts/webkitpy/port/driver.py | 5 ++++- Tools/WebKitTestRunner/Options.cpp | 9 +-------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Tools/ChangeLog b/Tools/ChangeLog index c3948fd..a6485ee 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,21 @@ +2015-04-16 Alexey Proskuryakov + + It is very hard to attach a debugger to WebProcess to debug tests + https://bugs.webkit.org/show_bug.cgi?id=143837 + + Reviewed by Chris Dumez. + + --no-timeout used to only affect waitUntilDone timeout, but not IPC timeout in + WebKitTestRunner, and not pipe reading timeout in run-webkit-tests. + + Now it disables all timeouts in tools, as is best for debugging tests. + + * Scripts/webkitpy/port/driver.py: (Driver.run_test): Respect --no-timeout, so + that the script doesn't terminate DRT/WKTR when there is no output for a long time. + + * WebKitTestRunner/Options.cpp: Removed --no-timeout-at-all, as --no-timeout + now has the same functionality. + 2015-04-16 Beth Dakin Force mouse events should go through normal mouse event handling code paths diff --git a/Tools/Scripts/webkitpy/port/driver.py b/Tools/Scripts/webkitpy/port/driver.py index 50a2087..60584ae 100755 --- a/Tools/Scripts/webkitpy/port/driver.py +++ b/Tools/Scripts/webkitpy/port/driver.py @@ -186,7 +186,10 @@ class Driver(object): # by 5 seconds to avoid racing for which timeout is detected first. # FIXME: It's not the job of the driver to decide what the timeouts should be. # Move the additional timeout to driver_input. - deadline = test_begin_time + int(driver_input.timeout) / 1000.0 + 5 + if self._no_timeout: + deadline = test_begin_time + 60 * 60 * 24 * 7 # 7 days. Using sys.maxint causes a hang. + else: + deadline = test_begin_time + int(driver_input.timeout) / 1000.0 + 5 self._server_process.write(command) text, audio = self._read_first_block(deadline) # First block is either text or audio diff --git a/Tools/WebKitTestRunner/Options.cpp b/Tools/WebKitTestRunner/Options.cpp index 286cd45..b6f5421 100644 --- a/Tools/WebKitTestRunner/Options.cpp +++ b/Tools/WebKitTestRunner/Options.cpp @@ -47,12 +47,6 @@ Options::Options() bool handleOptionNoTimeout(Options& options, const char*, const char*) { options.useWaitToDumpWatchdogTimer = false; - return true; -} - -bool handleOptionNoTimeoutAtAll(Options& options, const char*, const char*) -{ - options.useWaitToDumpWatchdogTimer = false; options.forceNoTimeout = true; return true; } @@ -116,8 +110,7 @@ bool handleOptionUnmatched(Options& options, const char* option, const char*) OptionsHandler::OptionsHandler(Options& o) : options(o) { - optionList.append(Option("--no-timeout", "Disables waitUntilDone timeout.", handleOptionNoTimeout)); - optionList.append(Option("--no-timeout-at-all", "Disables all timeouts.", handleOptionNoTimeoutAtAll)); + optionList.append(Option("--no-timeout", "Disables all timeouts.", handleOptionNoTimeout)); optionList.append(Option("--verbose", "Turns on messages.", handleOptionVerbose)); optionList.append(Option("--gc-between-tests", "Garbage collection between tests.", handleOptionGcBetweenTests)); optionList.append(Option("--pixel-tests", "Check pixels.", handleOptionPixelTests)); -- 1.8.3.1