Bug 79733 - nrwt: port/Driver needs to support per-test command line args
Summary: nrwt: port/Driver needs to support per-test command line args
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dirk Pranke
URL:
Keywords:
Depends on:
Blocks: 79431 79736
  Show dependency treegraph
 
Reported: 2012-02-27 19:02 PST by Dirk Pranke
Modified: 2012-02-29 15:50 PST (History)
7 users (show)

See Also:


Attachments
Patch (14.06 KB, patch)
2012-02-27 19:04 PST, Dirk Pranke
no flags Details | Formatted Diff | Diff
remove a couple start() methods I missed (14.37 KB, patch)
2012-02-27 19:11 PST, Dirk Pranke
no flags Details | Formatted Diff | Diff
update w/ review feedback (16.74 KB, patch)
2012-02-27 19:41 PST, Dirk Pranke
no flags Details | Formatted Diff | Diff
make driver.start() work again (17.19 KB, patch)
2012-02-28 16:08 PST, Dirk Pranke
no flags Details | Formatted Diff | Diff
patch to make chromium work, fix _start() (19.27 KB, patch)
2012-02-28 17:31 PST, Dirk Pranke
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2012-02-27 19:02:06 PST
nrwt: port/Driver needs to support per-test command line args
Comment 1 Dirk Pranke 2012-02-27 19:04:24 PST
Created attachment 129163 [details]
Patch
Comment 2 Dirk Pranke 2012-02-27 19:11:04 PST
Created attachment 129165 [details]
remove a couple start() methods I missed
Comment 3 Adam Barth 2012-02-27 19:14:10 PST
Comment on attachment 129163 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=129163&action=review

> Tools/Scripts/webkitpy/layout_tests/port/chromium.py:-599
> -    def start(self):
> -        if not self._proc:
> -            self._start()

Isn't this used by run-perf-tests?

> Tools/Scripts/webkitpy/layout_tests/port/test.py:355
> -        return 'junk'
> +        return '<path_to_driver>'

In other places we've used a string like:

MOCK path_to_driver

> Tools/Scripts/webkitpy/layout_tests/port/webkit.py:486
> +        cmd.extend(per_test_args)

This line is different than the one in chromium.py
Comment 4 Dirk Pranke 2012-02-27 19:41:19 PST
Created attachment 129172 [details]
update w/ review feedback
Comment 5 Dirk Pranke 2012-02-27 19:54:07 PST
(In reply to comment #3)
> (From update of attachment 129163 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=129163&action=review
> 
> > Tools/Scripts/webkitpy/layout_tests/port/chromium.py:-599
> > -    def start(self):
> > -        if not self._proc:
> > -            self._start()
> 
> Isn't this used by run-perf-tests?
> 

Ugh. So it is. rniwa, is it important that you be able to launch a DRT, then pause, and then start the test? (As opposed to pausing, and then launching DRT and immediately testing)?

I've been trying to move to a mode where running tests is mostly stateless in the interface (with stop() provided for cleanup), since the logic of when (and how) you need to restart can be kinda tricky.

> > Tools/Scripts/webkitpy/layout_tests/port/test.py:355
> > -        return 'junk'
> > +        return '<path_to_driver>'
> 
> In other places we've used a string like:
> 
> MOCK path_to_driver
>

Will change.
 
> > Tools/Scripts/webkitpy/layout_tests/port/webkit.py:486
> > +        cmd.extend(per_test_args)
> 
> This line is different than the one in chromium.py

Fixed.
Comment 6 Ryosuke Niwa 2012-02-27 19:56:27 PST
(In reply to comment #5)
> (In reply to comment #3)
> > (From update of attachment 129163 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=129163&action=review
> > 
> > > Tools/Scripts/webkitpy/layout_tests/port/chromium.py:-599
> > > -    def start(self):
> > > -        if not self._proc:
> > > -            self._start()
> > 
> > Isn't this used by run-perf-tests?
> > 
> 
> Ugh. So it is. rniwa, is it important that you be able to launch a DRT, then pause, and then start the test? (As opposed to pausing, and then launching DRT and immediately testing)?

Yes. It lets you attach a profiler, debugger, etc... abarth implemented that feature.
Comment 7 Dirk Pranke 2012-02-27 20:00:31 PST
(In reply to comment #6)
> > Ugh. So it is. rniwa, is it important that you be able to launch a DRT, then pause, and then start the test? (As opposed to pausing, and then launching DRT and immediately testing)?
> 
> Yes. It lets you attach a profiler, debugger, etc... abarth implemented that feature.

Ugh, and/or sigh :). Okay, I will figure out some way around this.
Comment 8 WebKit Review Bot 2012-02-27 22:28:36 PST
Comment on attachment 129172 [details]
update w/ review feedback

Attachment 129172 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11639503
Comment 9 Dirk Pranke 2012-02-28 16:08:45 PST
Created attachment 129348 [details]
make driver.start() work again
Comment 10 Dirk Pranke 2012-02-28 16:10:46 PST
Please take another look? I don't really like this as a long-term solution, since there's no good way to make driver.start() work with the idea that different tests might require different arguments. Perhaps it would be better to pass in a flag to run_test() to do the pause inside the test (although I don't really like having to push more logic inside that routine, either).
Comment 11 WebKit Review Bot 2012-02-28 16:36:07 PST
Comment on attachment 129348 [details]
make driver.start() work again

Attachment 129348 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11714172
Comment 12 Dirk Pranke 2012-02-28 17:31:35 PST
Created attachment 129361 [details]
patch to make chromium work, fix _start()
Comment 13 Adam Barth 2012-02-29 10:22:52 PST
Comment on attachment 129361 [details]
patch to make chromium work, fix _start()

View in context: https://bugs.webkit.org/attachment.cgi?id=129361&action=review

> Tools/ChangeLog:14
> +        This change adds support for that and removes the no-longer
> +        needed public Driver.start() method (which no one was calling).

This part isn't true anymore, right?

> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:-223
> +            driver.start()
>              if self._options.pause_before_testing:
> -                driver.start()

Why is this change necessary?
Comment 14 Dirk Pranke 2012-02-29 11:50:04 PST
Comment on attachment 129361 [details]
patch to make chromium work, fix _start()

View in context: https://bugs.webkit.org/attachment.cgi?id=129361&action=review

>> Tools/ChangeLog:14
>> +        needed public Driver.start() method (which no one was calling).
> 
> This part isn't true anymore, right?

Right. Will fix; thanks for the review!

>> Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py:-223
>> -                driver.start()
> 
> Why is this change necessary?

It isn't; I misremembered how the code worked originally. I'll put it back.
Comment 15 Dirk Pranke 2012-02-29 15:50:44 PST
This was fixed in http://trac.webkit.org/changeset/109242 . The changelog got confused in a merge :(.