[webkit-dev] Why is gtest in the Source directory?

David Levin levin at chromium.org
Thu May 12 14:33:03 PDT 2011


On Thu, May 12, 2011 at 11:33 AM, David Levin <levin at chromium.org> wrote:

>
>
> On Thu, May 12, 2011 at 10:36 AM, Adam Barth <abarth at webkit.org> wrote:
>
>> Here's a straw-man proposal:
>>
>> Tests/
>
>  -- All testing code.  Do test harnesses go here too?
>
>  Layout/  # Would be nice to have a better name since these test much
>> more than Layout
>>
>
> DumpRenderTreeTests?
> Integration?
> AutomatedHtmlTests?
>
>
>>  Performance/
>>  Unit/
>>
>
> with a directory structure that mirrors Source for the tests
>
>
>>  Manual/
>> Source/
>
>  -- Only the source code necessary for building WebKit.
>
>
>>  JavaScriptCore/
>>  WebCore/
>>  WebKit/
>>  ThirdParty/
>>    ANGLE/
>> Tools/
>>  WebKitTestRunner/
>
>  MiniBrowser/
>>  Scripts/
>>
>
> In this organization, gtest probably doesn't belong in Source because
>> it's not a dependency of WebKit.
>
>
> I agree but I felt like it lacked explicit definition, so I added some.
>
>
>>  It probably belongs somewhere in
>> Tests.  Maybe inside the Unit directory somewhere?
>>
>
> I think so. I wonder why we wouldn't put all tests related code under
> Tests. For example WebKitTestRunner, DumpRenderTree, CSSTestSuiteHarness
> seem to fit in that category and be similar in some ways to gtest in that
> they are the test harness.
>

Dmitry Lomov pointed out to me that DRT is a tool on its own. Now, I see a
reasonable distinction here.

In short, test harnesses are tools.
oth, gtest is part of the test code itself.



>
>
>
>>
>> Adam
>>
>>
>> On Thu, May 12, 2011 at 10:24 AM, Dmitry Lomov <dslomov at google.com>
>> wrote:
>> > I think more important issue to consider is should WebKit unit-tests
>> > (TestWebKitAPI) live under Tools.
>> > Unit-tests evolve with the product and an organic part of it - it
>> doesn't
>> > feel that they constitute a "tool".
>> > Three possible locations come to mind:
>> > - ./Tests - separate top-level directory, sibling to Source and
>> LayoutTests
>> > - ./Source/Test - separate directory, but under Source to emphasize that
>> > tests are part of the source code
>> > - Scattered around by the files that tests test, as David suggests.
>> > In terms of gtest directory placement, I think it is nice to have all
>> > third-party libraries live in the same place.
>> > What do people think?
>> > Kind regards,
>> > Dmitry
>> >
>> > On Thu, May 12, 2011 at 9:38 AM, David Levin <levin at chromium.org>
>> wrote:
>> >>
>> >> It sounds like you have a helpful mental mapping for what belongs in
>> each
>> >> directory that we haven't written anywhere.  Perhaps you could write it
>> down
>> >> and send it to webkit-dev so that we can make it a common model.
>> >> It feels like a related topic is why are the unit tests under Tools as
>> >> opposed to being by the files that they test. Being by the files they
>> tests
>> >> would make them easier to find and change as needed.  (For an example
>> of
>> >> where this is done,
>> >> see http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/commonwhere
>> >> there is file.py and file_unittest.py)
>> >> dave
>> >>
>> >> On Thu, May 12, 2011 at 8:36 AM, Dan Bernstein <mitz at apple.com> wrote:
>> >>>
>> >>> Is gtest required to build any of the WebKit ports? If not, can it be
>> >>> moved out of Source and into Tools?
>> >>>
>> >>> Thanks,
>> >>> —Dan
>> >>> _______________________________________________
>> >>> webkit-dev mailing list
>> >>> webkit-dev at lists.webkit.org
>> >>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>> >>
>> >>
>> >> _______________________________________________
>> >> webkit-dev mailing list
>> >> webkit-dev at lists.webkit.org
>> >> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>> >>
>> >
>> >
>> > _______________________________________________
>> > webkit-dev mailing list
>> > webkit-dev at lists.webkit.org
>> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>> >
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110512/839c93fc/attachment.html>


More information about the webkit-dev mailing list