Bug 99150

Summary: [BlackBerry] Dump DRT output to stdout if test is passed as command line argument
Product: WebKit Reporter: Xiaobo Wang <xiaobwang>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mifenton, mxie, rwlbuis, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Other   
Attachments:
Description Flags
patch
none
patch none

Xiaobo Wang
Reported 2012-10-12 01:13:44 PDT
As we discussed earlier, we would like to have an easy way to generate DRT output for specific test case. Now that DRT has its own launcher, we can pass the test case name as the argument for drt-launcher. RIM PR #222624
Attachments
patch (7.81 KB, patch)
2012-10-12 01:50 PDT, Xiaobo Wang
no flags
patch (7.79 KB, patch)
2012-10-14 19:38 PDT, Xiaobo Wang
no flags
Xiaobo Wang
Comment 1 2012-10-12 01:50:34 PDT
Rob Buis
Comment 2 2012-10-12 07:40:28 PDT
Comment on attachment 168379 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=168379&action=review > Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:339 > + if (testFile) { You can combine the above two lines.
Xiaobo Wang
Comment 3 2012-10-14 19:38:21 PDT
Created attachment 168614 [details] patch combined 2 lines into 1.
Rob Buis
Comment 4 2012-10-17 11:40:48 PDT
Comment on attachment 168614 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=168614&action=review Patch is ok, but runFromCommandLine functionality should be put into a function. > Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:224 > + if (runFromCommandLine) { I talked with Ming and we think it is nicer if this is a method instead, which does the getenv internally.
Xiaobo Wang
Comment 5 2012-10-18 03:41:15 PDT
(In reply to comment #4) > (From update of attachment 168614 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=168614&action=review > > Patch is ok, but runFromCommandLine functionality should be put into a function. > > > Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:224 > > + if (runFromCommandLine) { > > I talked with Ming and we think it is nicer if this is a method instead, which does the getenv internally. It's a little bit complicated to create a new function in DumpRenderTree for runFromCommandLine and call it from main.cpp directly. We need to go through libwebview and several places in webkit to call into DumpRenderTree.cpp. The setenv/getenv solution is much easier. The environment variable drtTestFile has two meanings: 1 - the test to run; 2 - it indicates the test is being run from commandline and we should dump text to stdout instead of redirecting to the dump file. I talked with Ming about this today, and he agreed with me.
Rob Buis
Comment 6 2012-10-18 09:09:46 PDT
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 168614 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=168614&action=review > > > > Patch is ok, but runFromCommandLine functionality should be put into a function. > > > > > Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp:224 > > > + if (runFromCommandLine) { > > > > I talked with Ming and we think it is nicer if this is a method instead, which does the getenv internally. > > It's a little bit complicated to create a new function in DumpRenderTree for runFromCommandLine and call it from main.cpp directly. We need to go through libwebview and several places in webkit to call into DumpRenderTree.cpp. The setenv/getenv solution is much easier. The environment variable drtTestFile has two meanings: 1 - the test to run; 2 - it indicates the test is being run from commandline and we should dump text to stdout instead of redirecting to the dump file. > I talked with Ming about this today, and he agreed with me. You are right, the patch is fine as it is.
Rob Buis
Comment 7 2012-10-18 09:10:04 PDT
Comment on attachment 168614 [details] patch LGTM.
WebKit Review Bot
Comment 8 2012-10-18 09:19:14 PDT
Comment on attachment 168614 [details] patch Clearing flags on attachment: 168614 Committed r131761: <http://trac.webkit.org/changeset/131761>
WebKit Review Bot
Comment 9 2012-10-18 09:19:18 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.