Bug 65986 - [Qt] autotests shouldn't require config.h in the style check
Summary: [Qt] autotests shouldn't require config.h in the style check
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Pierre Rossi
URL:
Keywords: Qt, QtTriaged
Depends on: 66070
Blocks: 65237
  Show dependency treegraph
 
Reported: 2011-08-10 08:07 PDT by Pierre Rossi
Modified: 2014-02-03 03:18 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.67 KB, patch)
2011-08-10 08:16 PDT, Pierre Rossi
no flags Details | Formatted Diff | Diff
Patch (2.05 KB, patch)
2011-08-11 03:05 PDT, Pierre Rossi
no flags Details | Formatted Diff | Diff
Patch (3.07 KB, patch)
2011-08-11 06:31 PDT, Pierre Rossi
no flags Details | Formatted Diff | Diff
Patch (3.32 KB, patch)
2011-08-11 11:02 PDT, Pierre Rossi
kling: review+
pierre.rossi: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Rossi 2011-08-10 08:07:26 PDT
It seems for the most part, our autotests fit pretty wel in the category "consumers of the WebKit API", so they should probably undergo the appropriate style checks.
Comment 1 Pierre Rossi 2011-08-10 08:16:36 PDT
Created attachment 103494 [details]
Patch
Comment 2 Robert Hogan 2011-08-10 13:49:42 PDT
Comment on attachment 103494 [details]
Patch

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

> Tools/ChangeLog:7
> +        This essentially prevents Qt tests from being style-checked
> +        against the same rules that apply to WebCore (e.g. config.h).

I think it's better to have them style-checked myself.
Comment 3 Pierre Rossi 2011-08-11 01:24:16 PDT
(In reply to comment #2)
> (From update of attachment 103494 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=103494&action=review
> 
> > Tools/ChangeLog:7
> > +        This essentially prevents Qt tests from being style-checked
> > +        against the same rules that apply to WebCore (e.g. config.h).
> 
> I think it's better to have them style-checked myself.

Hi Robert, I'm not sure to follow you. The point of this change is to allow things like what Benjamin suggested in https://bugs.webkit.org/show_bug.cgi?id=65237 In the case of these tests (apart for the special case of mime type sniffing), we are in the position of being consumers of the API provided by QtWebKit, so it seems to me that rules that enforce including config.h don't belong here. Maybe I should rephrase the ChangeLog message.
Comment 4 Pierre Rossi 2011-08-11 03:05:00 PDT
Created attachment 103596 [details]
Patch
Comment 5 Benjamin Poulain 2011-08-11 04:03:04 PDT
Comment on attachment 103596 [details]
Patch

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

You must also modify the tests accordingly. And you should add a new test for Source/WebKit/qt/tests/MIMESniffing.

> Tools/Scripts/webkitpy/style/checker.py:137
> +    ([# The MIMESniffing test tests the code directly rather than the API,
> +      # let's enable the include check for this one.
> +      "Source/WebKit/qt/tests/MIMESniffing"],
> +     ["+build/include"]),

This list is order sensitive. Only the first path substring match is used. -> Source/WebKit/qt/tests/MIMESniffing will never match
Comment 6 Pierre Rossi 2011-08-11 06:31:23 PDT
Created attachment 103614 [details]
Patch

Benjamin: oops ! looks like I didn't read the comment up there properly.
Comment 7 Benjamin Poulain 2011-08-11 07:14:59 PDT
Comment on attachment 103614 [details]
Patch

Good idea for a patch. I am glad those warning will disappear.
Comment 8 WebKit Review Bot 2011-08-11 07:40:42 PDT
Comment on attachment 103614 [details]
Patch

Clearing flags on attachment: 103614

Committed r92847: <http://trac.webkit.org/changeset/92847>
Comment 9 WebKit Review Bot 2011-08-11 07:40:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Dimitri Glazkov (Google) 2011-08-11 09:45:04 PDT
Reverted r92847 for reason:

Broke check-webkit-style

Committed r92857: <http://trac.webkit.org/changeset/92857>
Comment 11 Dimitri Glazkov (Google) 2011-08-11 09:45:53 PDT
Sorry guys, this broke the style elf, which is kind of a big deal -- I rolled it out.
Comment 12 Pierre Rossi 2011-08-11 11:02:09 PDT
Created attachment 103646 [details]
Patch

Sorry again about that guys. Since Benjamin mentioned the warnings happened in other places, I figured I'd add the WebKit2 qt tests in this.
Comment 13 Robert Hogan 2011-08-11 11:41:18 PDT
(In reply to comment #3)
> Hi Robert, I'm not sure to follow you. The point of this change is to allow things like what Benjamin suggested in https://bugs.webkit.org/show_bug.cgi?id=65237 In the case of these tests (apart for the special case of mime type sniffing), we are in the position of being consumers of the API provided by QtWebKit, so it seems to me that rules that enforce including config.h don't belong here. Maybe I should rephrase the ChangeLog message.

What I meant was: "The style check keeps the code clean, which is a good thing." If noise like the warnings about config.h are annoying, maybe we should target those instead.
Comment 14 Andreas Kling 2011-08-18 05:36:06 PDT
Comment on attachment 103646 [details]
Patch

rs=me
Comment 15 Pierre Rossi 2011-08-18 05:58:50 PDT
Comment on attachment 103646 [details]
Patch

Let's just hold it for now. I still need to check if that's not messing with alphabetical sorting thingy that was brought up earlier.
Comment 16 Csaba Osztrogonác 2012-06-26 07:47:32 PDT
Is this bug still valid?
Comment 17 Pierre Rossi 2012-06-27 10:03:00 PDT
(In reply to comment #16)
> Is this bug still valid?

Yes, it still is AFAICT, but it's more of a "nice to have" kind of thing though, and I never got back to it. I think I remember the concern raised by Robert turned out to be right and a rule specific to config.h should be introduced and only that should be disabled for autotests.
Comment 18 Jocelyn Turcotte 2014-02-03 03:18:33 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.