Changeset 177471 in webkit


Ignore:
Timestamp:
Dec 17, 2014 3:57:06 PM (9 years ago)
Author:
ap@apple.com
Message:

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.
(Driver._check_for_driver_timeout): Fix the timeout detection.
(Driver._read_block): Actually use the timeout detection code.

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting):

Use TestRunner default timeout when there isn't a timeout passed from command line for the test.

  • Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_default_timeout_ms):

Update results for the new default.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:

(RunTest.test_hung_thread): Restore a test that I previously deleted, it was
actually a good one.

Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r177464 r177471  
     12014-12-17  Alexey Proskuryakov  <ap@apple.com>
     2
     3        REGRESSION (r177363): Gtk and Efl testing is broken
     4        https://bugs.webkit.org/show_bug.cgi?id=139734
     5
     6        Reviewed by Simon Fraser.
     7
     8        * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
     9        (SingleTestRunner.__init__): Remove timeout adjustment from here, because it
     10        affected both script and tool timeout. This is still the right place for this logic,
     11        but it would be a larger refactoring than I can do right now.
     12
     13        * Scripts/webkitpy/port/base.py:
     14        (Port.supports_per_test_timeout): Added a FIXME.
     15        (Port.default_timeout_ms): Now that the effective timeout is longer, change this
     16        to avoid making tests take more time.
     17
     18        * Scripts/webkitpy/port/driver.py:
     19        (Driver.run_test): Adjust script timeout here.
     20        (Driver._check_for_driver_timeout): Fix the timeout detection.
     21        (Driver._read_block): Actually use the timeout detection code.
     22
     23        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::beginTesting):
     24        Use TestRunner default timeout when there isn't a timeout passed from command line for the test.
     25
     26        * Scripts/webkitpy/port/port_testcase.py: (PortTestCase.test_default_timeout_ms):
     27        Update results for the new default.
     28
     29        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
     30        (RunTest.test_hung_thread): Restore a test that I previously deleted, it was
     31        actually a good one.
     32
    1332014-12-17  Commit Queue  <commit-queue@webkit.org>
    234
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py

    r177464 r177471  
    6161        self._reference_files = test_input.reference_files
    6262        self._stop_when_done = stop_when_done
    63 
    6463        self._timeout = test_input.timeout
    65         if self._timeout > 5000:
    66             # Timeouts are detected by both script and tool; tool detected timeouts are
    67             # better, because they contain partial output. Give the tool some time to
    68             # report the timeout instead of being killed.
    69             self._timeout = int(self._timeout) - 5000
    7064
    7165        if self._reference_files:
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py

    r177370 r177471  
    267267        self.assertEqual(details.exit_code, 0)
    268268
     269    def test_hung_thread(self):
     270        details, err, _ = logging_run(['--run-singly', '--time-out-ms=50', 'failures/expected/hang.html'], tests_included=True)
     271        # Note that hang.html is marked as WontFix and all WontFix tests are
     272        # expected to Pass, so that actually running them generates an "unexpected" error.
     273        self.assertEqual(details.exit_code, 1)
     274        self.assertNotEmpty(err)
     275
    269276    def test_keyboard_interrupt(self):
    270277        # Note that this also tests running a test marked as SKIP if
  • trunk/Tools/Scripts/webkitpy/port/base.py

    r177464 r177471  
    132132
    133133    def supports_per_test_timeout(self):
     134        # FIXME: Make per-test timeouts unconditional once all ports' DumpRenderTrees support that.
     135        # Windows DumpRenderTree may be the only one remaining to be fixed at this time.
    134136        return False
    135137
     
    139141
    140142    def default_timeout_ms(self):
    141         return 35 * 1000
     143        return 30 * 1000
    142144
    143145    def driver_stop_timeout(self):
  • trunk/Tools/Scripts/webkitpy/port/driver.py

    r177464 r177471  
    180180
    181181        command = self._command_from_driver_input(driver_input)
    182         deadline = test_begin_time + int(driver_input.timeout) / 1000.0
     182
     183        # Certain timeouts are detected by the tool itself; tool detection is better,
     184        # because results contain partial output in this case. Make script timeout longer
     185        # by 5 seconds to avoid racing for which timeout is detected first.
     186        # FIXME: It's not the job of the driver to decide what the timeouts should be.
     187        # Move the additional timeout to driver_input.
     188        deadline = test_begin_time + int(driver_input.timeout) / 1000.0 + 5
    183189
    184190        self._server_process.write(command)
     
    364370
    365371    def _check_for_driver_timeout(self, out_line):
    366         if out_line == "FAIL: Timed out waiting for notifyDone to be called":
     372        if out_line == "FAIL: Timed out waiting for notifyDone to be called\n":
    367373            self._driver_timed_out = True
    368374
     
    485491
    486492            if out_line:
     493                self._check_for_driver_timeout(out_line)
    487494                if out_line[-1] != "\n":
    488495                    _log.error("Last character read from DRT stdout line was not a newline!  This indicates either a NRWT or DRT bug.")
  • trunk/Tools/Scripts/webkitpy/port/port_testcase.py

    r177028 r177471  
    9393
    9494    def test_default_timeout_ms(self):
    95         self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 35000)
    96         self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 35000)
     95        self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 30000)
     96        self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 30000)
    9797
    9898    def test_default_pixel_tests(self):
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r177464 r177471  
    267267    m_testRunner->setTabKeyCyclesThroughElements(true);
    268268
    269     m_testRunner->setCustomTimeout(m_timeout);
     269    if (m_timeout > 0)
     270        m_testRunner->setCustomTimeout(m_timeout);
    270271
    271272    page()->prepare();
Note: See TracChangeset for help on using the changeset viewer.