test-webkitpy: prepare for better test run output
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2012 19:15:53 +0000 (19:15 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Mar 2012 19:15:53 +0000 (19:15 +0000)
commit3c66a92e445cde25cbb6ba3d46c98ee2ddfc8c52
tree7e8da501f391fbedce82a3b0ac7f0bbf2a947d94
parent6d259a1115658807ccba00d3e3046478c188cd89
test-webkitpy: prepare for better test run output
https://bugs.webkit.org/show_bug.cgi?id=82290

Reviewed by Adam Barth.

This code basically re-implements the output of the TextTestRunner default
runner code from unittest, although the implementation is quite
different, in preparation for changing the test output to be
metered and possibly running in parallel.

The output is almost identical to before, except that instead of
logging "test_regular (webkitpy.main.RunnerTest) passed" we log
"webkitpy.main.RunnerTest.test_regular passed". It has always
annoyed me that they invert the names to be harder to read and
so that you can't copy & paste back to the input for
test-webkitpy.

This patch is provided to add a skeleton for unit tests and for
comparison to an upcoming patch that will actually add new
functionality.

* Scripts/webkitpy/test/main.py:
(Tester.__init__):
(Tester._configure_logging):
(Tester._run_tests):
* Scripts/webkitpy/test/runner.py: Added.
(TestRunner):
(TestRunner.__init__):
(TestRunner.test_name):
(TestRunner.all_test_names):
(TestRunner.run):
(TestRunner.write_result):
(TestRunner.write_summary):
* Scripts/webkitpy/test/runner_unittest.py: Added.
(FakeModuleSuite):
(FakeModuleSuite.__init__):
(FakeModuleSuite.__str__):
(FakeModuleSuite.run):
(FakeTopSuite):
(FakeTopSuite.__init__):
(FakeLoader):
(FakeLoader.__init__):
(FakeLoader.top_suite):
(FakeLoader.loadTestsFromName):
(RunnerTest):
(RunnerTest.test_regular):
(RunnerTest.test_verbose):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112298 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/test/main.py
Tools/Scripts/webkitpy/test/runner.py [new file with mode: 0644]
Tools/Scripts/webkitpy/test/runner_unittest.py [new file with mode: 0644]