Bug 101081 - webkit-patch rebaseline is broken
Summary: webkit-patch rebaseline is broken
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:
 
Reported: 2012-11-02 11:56 PDT by Dirk Pranke
Modified: 2012-11-02 17:51 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.38 KB, patch)
2012-11-02 11:59 PDT, Dirk Pranke
no flags Details | Formatted Diff | Diff
clarify bugfix in changelog (4.72 KB, patch)
2012-11-02 14:57 PDT, Dirk Pranke
ojan: 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-11-02 11:56:32 PDT
webkit-patch rebaseline is broken
Comment 1 Dirk Pranke 2012-11-02 11:59:15 PDT
Created attachment 172100 [details]
Patch
Comment 2 Ojan Vafai 2012-11-02 13:04:39 PDT
Comment on attachment 172100 [details]
Patch

I don't understand this fix. Can you explain it more in the ChangeLog?
Comment 3 Dirk Pranke 2012-11-02 14:57:20 PDT
Created attachment 172149 [details]
clarify bugfix in changelog
Comment 4 Ojan Vafai 2012-11-02 16:57:35 PDT
Comment on attachment 172149 [details]
clarify bugfix in changelog

Not sure whether I prefer this or changing AbstractParallelRebaselineCommand to check:
if hasattr(options, "results_directory"):

They're both a little gross.

Another option would be to have AbstractParallelRebaselineCommand._rebaseline not take an options argument at all and just take the individual arguments it needs to know about. That'd probably be cleanest.

Up to you.
Comment 5 Dirk Pranke 2012-11-02 17:23:53 PDT
(In reply to comment #4)
> (From update of attachment 172149 [details])
> Not sure whether I prefer this or changing AbstractParallelRebaselineCommand to check:
> if hasattr(options, "results_directory"):
> 
> They're both a little gross.
> 
> Another option would be to have AbstractParallelRebaselineCommand._rebaseline not take an options argument at all and just take the individual arguments it needs to know about. That'd probably be cleanest.
> 
> Up to you.

Yeah, I considered all of these options already. I really don't like the 'hasattr' approach (it's a real flaw in the way we handle all of the port-specific options in the layout_tests/port classes).

I originally wasn't passing the options object down and was passing the arguments individually but that was getting increasingly unwieldy.

I don't think this is far away from the idea that the options object has a set of default values, and then we provide command line flags to override them where relevant; that approach is cleaner, but the interface that the tool command constructors use to pass options back and forth don't give you a way to do this, unfortunately (we don't get direct access to the options argument until execute() is called, so we can't set default values anywhere).

So I prefer the way I ended up doing it. Hope that helps explain the approach.
Comment 6 Ojan Vafai 2012-11-02 17:31:05 PDT
sgtm
Comment 7 Dirk Pranke 2012-11-02 17:51:19 PDT
Committed r133382: <http://trac.webkit.org/changeset/133382>