Bug 24039 - Separate gtk unit tests
Summary: Separate gtk unit tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2009-02-19 12:35 PST by Christian Dywan
Modified: 2009-03-20 12:47 PDT (History)
0 users

See Also:


Attachments
Separate the tests (26.49 KB, patch)
2009-03-07 22:38 PST, Jan Alonzo
zecke: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Dywan 2009-02-19 12:35:29 PST
The few gtk specific tests we have at this point are all contained in one source file. I'd like to split up the tests per feature and keep that in mind for the future.

For instance "web view", "web frame", "back forward list" would seem like a start.

On a related matter, what about running these tests in "make check"?
Comment 1 Jan Alonzo 2009-03-07 22:38:50 PST
Created attachment 28395 [details]
Separate the tests

This patch also includes the build support needed to build the separate tests.
Comment 2 Holger Freyther 2009-03-11 01:59:16 PDT
Could you explain the reasoning behind creating multiple programs. The only benefit is that one run of a test is not influencing other parts. The downsides are runtime overhead to start the app, repeated boilerplate code, people driving the tests need to know the multiple binary names...

I think the different files/areas should be separate GTestSuite's.
Comment 3 Christian Dywan 2009-03-15 12:36:21 PDT
(In reply to comment #2)
> Could you explain the reasoning behind creating multiple programs. The only
> benefit is that one run of a test is not influencing other parts. The downsides
> are runtime overhead to start the app, repeated boilerplate code, people
> driving the tests need to know the multiple binary names...
> 
> I think the different files/areas should be separate GTestSuite's.

Well, the main reason is modularity which makes it easy to maintain, run particular tests independently, add new tests, avoid having to edit a file that is several megabytes large...

The overhead isn't really noticible. Arguably WebCore should live in a single file because that decreases linking overhead, what do you think? ;)
Comment 4 Holger Freyther 2009-03-17 10:31:49 PDT
It is not about the linking overhead. But think of automatic execution of the test executables, collecting the results, generating coverage data... having a single executable makes it a lot more easy to have a stable test setup.
Comment 5 Holger Freyther 2009-03-17 10:37:06 PDT
Comment on attachment 28395 [details]
Separate the tests


> +2009-03-07  Jan Michael Alonzo  <jmalonzo@webkit.org>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        Separate gtk unit tests
> +        https://bugs.webkit.org/show_bug.cgi?id=24039

Could you please describe the reasoning of the split up here?

and please use svn cp to copy the file when landing.
Comment 6 Jan Alonzo 2009-03-20 12:47:02 PDT
(In reply to comment #5)
> (From update of attachment 28395 [details] [review])
> 
> > +2009-03-07  Jan Michael Alonzo  <jmalonzo@webkit.org>
> > +
> > +        Reviewed by NOBODY (OOPS!).
> > +
> > +        Separate gtk unit tests
> > +        https://bugs.webkit.org/show_bug.cgi?id=24039
> 
> Could you please describe the reasoning of the split up here?
> 
> and please use svn cp to copy the file when landing.
> 

Thanks. Landed in r41864