Changeset 71146 in webkit


Ignore:
Timestamp:
Nov 2, 2010 12:08:40 PM (13 years ago)
Author:
Adam Roben
Message:

Skip webkitpy.layout_tests.run_webkit_tests_unittest.MainTest on Cygwin Python 2.5.x

It is known to hang on that version of Python. See
<http://webkit.org/b/48614>.

Reviewed by Adam Barth.

  • Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py: Use

skip_if to skip MainTest on Cygwin Python 2.5.x.

  • Scripts/webkitpy/test/skip.py: Added.

(skip_if): If the passed-in condition is false, find all the test_*
methods of the given class and replace them with a function that just
logs that we're skipping these tests. This is loosely based on the
unittest.skip_if decorator added in Python 3.1.
(_skipped_method): Returns a function that just logs that the tests are
being skipped. This is used in place of the actual test_* functions.

  • Scripts/webkitpy/test/skip_unittest.py: Added.

(SkipTest.setUp): Create a logger for ourselves and give it a handler
that logs to a private stream.
(SkipTest.tearDown): Reset the logger.
(SkipTest.create_fixture_class): Returns a class that we use to test
skip_if. It has a single test_* method, test_foo, that just calls
through to a callback.
(SkipTest.foo_callback): Record that test_foo was called.
(SkipTest.test_skip_if_false): Pass skip_if a False condition and test
that test_foo does get called.
(SkipTest.test_skip_if_true): Pass skip_if a True condition and test
that test_foo does not get called and the appropriate message gets
logged.

Location:
trunk/WebKitTools
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r71142 r71146  
     12010-11-02  Adam Roben  <aroben@apple.com>
     2
     3        Skip webkitpy.layout_tests.run_webkit_tests_unittest.MainTest on Cygwin
     4        Python 2.5.x
     5
     6        It is known to hang on that version of Python. See
     7        <http://webkit.org/b/48614>.
     8
     9        Reviewed by Adam Barth.
     10
     11        * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py: Use
     12        skip_if to skip MainTest on Cygwin Python 2.5.x.
     13
     14        * Scripts/webkitpy/test/skip.py: Added.
     15        (skip_if): If the passed-in condition is false, find all the test_*
     16        methods of the given class and replace them with a function that just
     17        logs that we're skipping these tests. This is loosely based on the
     18        unittest.skip_if decorator added in Python 3.1.
     19        (_skipped_method): Returns a function that just logs that the tests are
     20        being skipped. This is used in place of the actual test_* functions.
     21
     22        * Scripts/webkitpy/test/skip_unittest.py: Added.
     23        (SkipTest.setUp): Create a logger for ourselves and give it a handler
     24        that logs to a private stream.
     25        (SkipTest.tearDown): Reset the logger.
     26        (SkipTest.create_fixture_class): Returns a class that we use to test
     27        skip_if. It has a single test_* method, test_foo, that just calls
     28        through to a callback.
     29        (SkipTest.foo_callback): Record that test_foo was called.
     30        (SkipTest.test_skip_if_false): Pass skip_if a False condition and test
     31        that test_foo does get called.
     32        (SkipTest.test_skip_if_true): Pass skip_if a True condition and test
     33        that test_foo does not get called and the appropriate message gets
     34        logged.
     35
    1362010-11-02  Adam Barth  <abarth@webkit.org>
    237
  • trunk/WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

    r70277 r71146  
    5050from webkitpy.layout_tests.layout_package import dump_render_tree_thread
    5151from webkitpy.layout_tests.port.test import TestPort
     52from webkitpy.python24.versioning import compare_version
     53from webkitpy.test.skip import skip_if
    5254
    5355from webkitpy.thirdparty.mock import Mock
     
    287289        test_port = get_port_for_run(base_args)
    288290        self.assertEqual(None, test_port.tolerance_used_for_diff_image)
     291
     292MainTest = skip_if(MainTest, sys.platform == 'cygwin' and compare_version(sys, '2.6')[0] < 0, 'new-run-webkit-tests tests hang on Cygwin Python 2.5.2')
    289293
    290294
Note: See TracChangeset for help on using the changeset viewer.