Bug 46278 - NRWT doesn't respect config set with set-webkit-configuration
Summary: NRWT doesn't respect config set with set-webkit-configuration
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dirk Pranke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-22 10:39 PDT by Mihai Parparita
Modified: 2010-09-26 20:40 PDT (History)
8 users (show)

See Also:


Attachments
Patch (5.71 KB, patch)
2010-09-24 09:25 PDT, Mihai Parparita
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mihai Parparita 2010-09-22 10:39:55 PDT
Even though I ran set-webkit-configuration --debug a while back (and build-webkit --chromium respects it), NRWT kept looking for the DRT binary in the Release directory until I passed an explicit --debug flag to it.

I suspect http://trac.webkit.org/changeset/68008 (unintentionally?) triggered this behavior change.
Comment 1 Dirk Pranke 2010-09-22 12:04:13 PDT
Odd ... I thought I had a test for this. Looking into it now; it's certainly possible that that change broke this.
Comment 2 Mihai Parparita 2010-09-23 17:02:17 PDT
+Adam, since he reviewed r68008.

There was a change to chromium.py which is responsible for this:

http://trac.webkit.org/changeset/68008/trunk/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py

Was there a reason why ChromiumPort now sets the default configuration to Release in it constructor? There is code that runs later (_set_up_derived_options in run_webkit_tests.py) which would do the similar initialization:

    if not options.configuration:
        options.configuration = port_obj.default_configuration()
Comment 3 Mihai Parparita 2010-09-23 17:21:36 PDT
(In reply to comment #2)
> Was there a reason why ChromiumPort now sets the default configuration to Release in it constructor? 

I now see that that code was always there, just duplicated in Mac/Linux/Windows subclasses of ChromiumPort. However, 

if options and not hasattr(options, 'configuration'): 
    options.configuration = 'Release'

Whereas now it's more aggressive:

if (options and (not hasattr(options, 'configuration') or
                 options.configuration is None)):
    options.configuration = 'Release'

options.configuration is defined by parse_args in run_webkit_tests.py, it's just set to None.

Any objection to reverting the options.configuration check to the way it was before?
Comment 4 Dirk Pranke 2010-09-23 18:50:36 PDT
No objection. This code was accidentally broken.

I am in the middle of fixing it properly and writing better unit tests so that it doesn't break again. This turns out to involve a fair amount of yak-shaving, but I should have a patch this evening.
Comment 5 Mihai Parparita 2010-09-23 22:10:09 PDT
(In reply to comment #4)
> I am in the middle of fixing it properly and writing better unit tests so that it doesn't break again. This turns out to involve a fair amount of yak-shaving, but I should have a patch this evening.

I was looking into the "right" way of fixing it this afternoon, and it seemed like having the ChromiumPort constructor call self.default_configuration() instead of hardcoding 'Release' would be better, but I wasn't sure what the implications of that would be (for starters, the unit tests didn't pass, since they didn't mock out the configuration reading so were getting it from the filesystem).
Comment 6 Mihai Parparita 2010-09-24 09:25:47 PDT
Created attachment 68690 [details]
Patch
Comment 7 Mihai Parparita 2010-09-24 09:27:36 PDT
+Tony, since I see he rolled back Dirk's quick fix since it broke NRWT on the canary bots (http://trac.webkit.org/changeset/68234). What exactly broke, and how can I make sure my patch doesn't break things too?
Comment 8 Tony Chang 2010-09-24 10:04:27 PDT
(In reply to comment #7)
> +Tony, since I see he rolled back Dirk's quick fix since it broke NRWT on the canary bots (http://trac.webkit.org/changeset/68234). What exactly broke, and how can I make sure my patch doesn't break things too?

It failed because of:
  import pdb
  pdb.set_trace()

Which put the interpreter into interactive mode.
Comment 9 WebKit Commit Bot 2010-09-24 10:22:59 PDT
Comment on attachment 68690 [details]
Patch

Clearing flags on attachment: 68690

Committed r68268: <http://trac.webkit.org/changeset/68268>
Comment 10 WebKit Commit Bot 2010-09-24 10:23:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Dirk Pranke 2010-09-24 12:14:16 PDT
(In reply to comment #6)
> Created an attachment (id=68690) [details]
> Patch

Yup, that'll work, although there's a lot more scaffolding than I would hope to have and it still doesn't test all the way through to make sure that every port is actually hitting the config file to pull the default (i.e., if ChromiumPort accidentally (?) defines a different default_configuration() we won't notice it in these tests).

So, I'll keep hacking on the "right" fix but thanks for taking care of this for now.

-- Dirk
Comment 12 Andrey Kosyakov 2010-09-26 06:09:06 PDT
This change apparently broke nacl_ui_tests in chromium:

http://build.chromium.org/buildbot/waterfall/builders/NACL%20Tests/builds/17999
Comment 13 Mihai Parparita 2010-09-26 19:20:28 PDT
(In reply to comment #12)
> This change apparently broke nacl_ui_tests in chromium:
> 
> http://build.chromium.org/buildbot/waterfall/builders/NACL%20Tests/builds/17999

Thanks for letting me know.  I've put up a fix at bug 46602.
Comment 14 Mihai Parparita 2010-09-26 20:40:39 PDT
(In reply to comment #13)
> Thanks for letting me know.  I've put up a fix at bug 46602.

Landed as http://trac.webkit.org/changeset/68365.