[Chromium] Support the --{in,out,err}-fifo arguments on TestWebKitAPI and webkit_unit...
authorpeter@chromium.org <peter@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 17:37:44 +0000 (17:37 +0000)
committerpeter@chromium.org <peter@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 17:37:44 +0000 (17:37 +0000)
commit01e40bf02233c506589b436571d66a029366cefe
treeb38e45c91b387d95fb031c8c4f68ca5cc59479e6
parentbbb968f71c8dfa79f7095b18909f5ba54ced87dd
[Chromium] Support the --{in,out,err}-fifo arguments on TestWebKitAPI and webkit_unit_tests
https://bugs.webkit.org/show_bug.cgi?id=96687

Reviewed by Tony Chang.

Android's DumpRenderTree currently supports these arguments, implemented
as part of TestShellAndroid:
http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp?rev=128496

They're used by the layout test runner to get the STDOUT and STDERR while
a layout test run is in process, which is a safer alternative to parsing
all the logcat output manually. The implementation can be seen here:
http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py?rev=128496#L590

This patch generalizes parsing of and applying the effects of these arguments
so that they can be used for TestWebKitAPI and webkit_unit_tests as well.
After this patch, this will make it possible to pull out the output-reading
code from Android's layout test port and generalize it so it can be re-used
in the new test-runner for the other two test suites.

This has no effect when compiling and running these tests as part of Chromium
code, which has a much more advanced test-runner that does parse complete log
output, but also directly depends on code licensed under Apache 2.

Source/WebKit/chromium:

* WebKit.gypi:
* tests/ForwardIOStreamsAndroid.cpp: Added.
(WebKit):
(WebKit::maybeInitIOStreamForwardingForAndroid):
* tests/ForwardIOStreamsAndroid.h: Added.
(WebKit):
* tests/RunAllTests.cpp:
(main):

Tools:

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
* DumpRenderTree/chromium/TestShellAndroid.cpp:
(platformInit):
* TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@128628 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKitUnitTests.gyp
Source/WebKit/chromium/tests/ForwardIOStreamsAndroid.cpp [new file with mode: 0644]
Source/WebKit/chromium/tests/ForwardIOStreamsAndroid.h [new file with mode: 0644]
Source/WebKit/chromium/tests/RunAllTests.cpp
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp