test-webkitpy: clean up logging to make it ninja-esque
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 21:13:29 +0000 (21:13 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 Jul 2012 21:13:29 +0000 (21:13 +0000)
commit6238bdeafdfbd93c00099c53d70926d9a5e55826
tree4a20439783287d5d70ace5e3f5f0aac30367305f
parent9c758482ed75cb3f22c8284e39ef945a50f00573
test-webkitpy: clean up logging to make it ninja-esque
https://bugs.webkit.org/show_bug.cgi?id=91297

Reviewed by Adam Barth.

This patch changes the output of test-webkitpy to be closer to
what ninja produces. Namely:

If you are running with stderr writing to a tty (and not -v), we
will no longer print '...' as tests complete. Instead, we use a
metered stream and print entries of the form:
   '[X/Y] test_name passed/failed/erred'
where X is the current test # and Y is the total number of tests.

If you are running with stderr piped to a file or other non-tty
object (or with -v), you get the same output, one per line for
every test.

In addition, if tests fail or err out, you get the stack trace
immediately; you don't have to wait until the end of the run.

Lastly, this change cleans up the unit tests for test-webkitpy
itself to not confuse the logger and to work cleanly w/ multiple
processes. It looks like between this and all the clean up in
MessagePool that happened as it landed, we can now run
multiprocessing tests in parallel.

* Scripts/webkitpy/test/finder.py:
(Finder._default_names):
* Scripts/webkitpy/test/finder_unittest.py:
(FinderTest.setUp):
(FinderTest.tearDown):
* Scripts/webkitpy/test/printer.py:
(Printer.__init__):
(Printer.configure):
(Printer.print_started_test):
(Printer.print_finished_test):
(Printer._test_line):
(Printer.print_result):
* Scripts/webkitpy/test/runner.py:
(Runner.run):
* Scripts/webkitpy/test/runner_unittest.py:
(RunnerTest.setUp):
(RunnerTest):
(RunnerTest.tearDown):
(RunnerTest.assert_run):
(RunnerTest.test_regular):
(RunnerTest.test_verbose):
(RunnerTest.test_timing):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/test/finder.py
Tools/Scripts/webkitpy/test/finder_unittest.py
Tools/Scripts/webkitpy/test/printer.py
Tools/Scripts/webkitpy/test/runner.py
Tools/Scripts/webkitpy/test/runner_unittest.py