Skip webkitpy.layout_tests.run_webkit_tests_unittest.MainTest on Cygwin Python 2.5.x
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Nov 2010 19:08:40 +0000 (19:08 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Nov 2010 19:08:40 +0000 (19:08 +0000)
commit700deb4fac094d2fd8f413cc8aad7d8e6f91f7fa
tree851c2733ba0ecac7c34ae8cd60c37879b704aa1a
parent129e1c691a55de71850c5d40464b09798a5abfca
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@71146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKitTools/ChangeLog
WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
WebKitTools/Scripts/webkitpy/test/skip.py [new file with mode: 0644]
WebKitTools/Scripts/webkitpy/test/skip_unittest.py [new file with mode: 0644]