Bug 99150 - [BlackBerry] Dump DRT output to stdout if test is passed as command line argument
Summary: [BlackBerry] Dump DRT output to stdout if test is passed as command line argu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-12 01:13 PDT by Xiaobo Wang
Modified: 2012-10-18 09:19 PDT (History)
5 users (show)

See Also:


Attachments
patch (7.81 KB, patch)
2012-10-12 01:50 PDT, Xiaobo Wang
no flags Details | Formatted Diff | Diff
patch (7.79 KB, patch)
2012-10-14 19:38 PDT, Xiaobo Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xiaobo Wang 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
Comment 1 Xiaobo Wang 2012-10-12 01:50:34 PDT
Created attachment 168379 [details]
patch
Comment 2 Rob Buis 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.
Comment 3 Xiaobo Wang 2012-10-14 19:38:21 PDT
Created attachment 168614 [details]
patch

combined 2 lines into 1.
Comment 4 Rob Buis 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.
Comment 5 Xiaobo Wang 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.
Comment 6 Rob Buis 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.
Comment 7 Rob Buis 2012-10-18 09:10:04 PDT
Comment on attachment 168614 [details]
patch

LGTM.
Comment 8 WebKit Review Bot 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>
Comment 9 WebKit Review Bot 2012-10-18 09:19:18 PDT
All reviewed patches have been landed.  Closing bug.