Skip to content
Permalink
Browse files
REGRESSION (r177363): Gtk and Efl testing is broken
https://bugs.webkit.org/show_bug.cgi?id=139734

Reviewed by Simon Fraser.

* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner.__init__): Remove timeout adjustment from here, because it
affected both script and tool timeout. This is still the right place for this logic,
but it would be a larger refactoring than I can do right now.

* Scripts/webkitpy/port/base.py:
(Port.supports_per_test_timeout): Added a FIXME.
(Port.default_timeout_ms): Now that the effective timeout is longer, change this
to avoid making tests take more time.

* Scripts/webkitpy/port/driver.py: (Driver.run_test): Adjust script timeout here.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting):
Use TestRunner default timeout when there isn't a timeout passed from command line for the test.



Canonical link: https://commits.webkit.org/157647@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aproskuryakov committed Dec 17, 2014
1 parent 0e4b2b5 commit ea55527fb530f2149deeb75f3fb913747dbfa2f8
@@ -1,3 +1,25 @@
2014-12-17 Alexey Proskuryakov <ap@apple.com>

REGRESSION (r177363): Gtk and Efl testing is broken
https://bugs.webkit.org/show_bug.cgi?id=139734

Reviewed by Simon Fraser.

* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner.__init__): Remove timeout adjustment from here, because it
affected both script and tool timeout. This is still the right place for this logic,
but it would be a larger refactoring than I can do right now.

* Scripts/webkitpy/port/base.py:
(Port.supports_per_test_timeout): Added a FIXME.
(Port.default_timeout_ms): Now that the effective timeout is longer, change this
to avoid making tests take more time.

* Scripts/webkitpy/port/driver.py: (Driver.run_test): Adjust script timeout here.

* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting):
Use TestRunner default timeout when there isn't a timeout passed from command line for the test.

2014-12-17 Carlos Garcia Campos <cgarcia@igalia.com>

[GTK] Simplify timeout handling in TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded
@@ -60,13 +60,7 @@ def __init__(self, port, options, results_directory, worker_name, driver, test_i
self._should_run_pixel_test = test_input.should_run_pixel_test
self._reference_files = test_input.reference_files
self._stop_when_done = stop_when_done

self._timeout = test_input.timeout
if self._timeout > 5000:
# Timeouts are detected by both script and tool; tool detected timeouts are
# better, because they contain partial output. Give the tool some time to
# report the timeout instead of being killed.
self._timeout = int(self._timeout) - 5000

if self._reference_files:
# Detect and report a test which has a wrong combination of expectation files.
@@ -131,14 +131,16 @@ def additional_drt_flag(self):
return []

def supports_per_test_timeout(self):
# FIXME: Make per-test timeouts unconditional once all ports' DumpRenderTrees support that.
# Windows DumpRenderTree may be the only one remaining to be fixed at this time.
return False

def default_pixel_tests(self):
# FIXME: Disable until they are run by default on build.webkit.org.
return False

def default_timeout_ms(self):
return 35 * 1000
return 30 * 1000

def driver_stop_timeout(self):
""" Returns the amount of time in seconds to wait before killing the process in driver.stop()."""
@@ -179,7 +179,13 @@ def run_test(self, driver_input, stop_when_done):
self.err_seen_eof = False

command = self._command_from_driver_input(driver_input)
deadline = test_begin_time + int(driver_input.timeout) / 1000.0

# Certain timeouts are detected by the tool itself; tool detection is better,
# because results contain partial output in this case. Make script timeout longer
# 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

self._server_process.write(command)
text, audio = self._read_first_block(deadline) # First block is either text or audio
@@ -266,7 +266,8 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
m_testRunner->setAcceptsEditing(true);
m_testRunner->setTabKeyCyclesThroughElements(true);

m_testRunner->setCustomTimeout(m_timeout);
if (m_timeout > 0)
m_testRunner->setCustomTimeout(m_timeout);

page()->prepare();

0 comments on commit ea55527

Please sign in to comment.