why layout tests search for results the way they do (was Re: Time to switch to 10.6 for Mac LayoutTests (was: Re: Gardening is too hard))

0 views
Skip to first unread message

Dirk Pranke

unread,
Mar 30, 2011, 12:56:16 PM3/30/11
to chromium-dev, yu...@chromium.org
Kitamura-san asked why the Layout Tests in WebKit use the logic they
do use to figure out which versions of the results to use for a test.
I figured this might not be general knowledge, so I've copied the
whole list:

On Wed, Mar 30, 2011 at 5:51 AM, Yuta Kitamura <yu...@google.com> wrote:
> The list is here:
> http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
> 48    FALLBACK_PATHS = {
> 49        'leopard': ['chromium-mac-leopard', 'chromium-mac-snowleopard',
> 'chromium-mac', 'chromium',
> 50                    'mac-leopard', 'mac-snowleopard', 'mac'],
> 51        'snowleopard': ['chromium-mac-snowleopard', 'chromium-mac',
> 'chromium',
> 52                        'mac-snowleopard', 'mac'],
> 53        '': ['chromium-mac', 'chromium', 'mac'],
> 54    }
> I don't really understand why "chromium-mac-snowleopard" and
> "mac-snowleopard" is in the list of Leopard.


Here's the logic behind the layout test paths:

Assume you have three tests called foo, bar, and baz and suppose we're
a couple of years ago, when Leopard was the most recent version of the
Mac. The generic version of a platform always contains the "future" or
"latest" version of the results.

LayoutTests/platform/chromium-mac contains:
foo-expected.txt r1.1
bar-expected.txt r.1.1
baz-expected.txt r.1.1

Now Snow Leopard comes out, and foo produces different results. You
want SL to find the new file, and the other two to find the old file.
We put the new file in the "future" version, and move the older file
into the directory matching the last platform that passed it:

platform/chromium-mac:
foo-expected.txt r1.2
bar-expected.txt r1.1
baz-expected.txt r1.1
platform/chromium-mac-leopard:
foo-expected.txt r1.1

SL only looks in the -mac dir, and Leopard looks in -mac-leopard, then -mac.

Now Lion comes out, and bar changes, and foo changes again. We can
leave the -leopard directory alone, and create a new -snowleopard
directory, and only have to move the two failing tests there:

platform/chromium-mac:
foo-expected.txt r1.3
bar-expected.txt r1.2
baz-expected.txt r1.1
platform/chromium-mac-snowleopard:
foo-expected.txt r1.2
bar-expected.txt r1.1
platform/chromium-mac-leopard:
foo-expected.txt r1.1

Lion only looks in -mac, SL looks in -mac-snowleopard, then -mac, and
Leopard looks in -leopard, then -snowleopard, then -mac.

If Leopard didn't look in the snowleopard directory, then we would
have to copy versions of files more places every time a new release
came out. This approach minimizes the amount of file shuffling we have
to do, and keeps most of the files in platform/chromium-mac. But, it
means that version X needs to look in every newer version in order to
find the right files.

Another way to think of it is that directory X-1 contains all and only
the files that were different between versions X-1 and X, and then
realize that this is, in a sense, associative (but not commutative).
So, if you want to find the differences between Leopard (Lion-2) and
Lion, you can look for delta(Lion-2, Lion-1) then delta(Lion-1, Lion)
(but you can't reverse the order).

Also, in Chromium we try to match the upstream baselines where
possible (but we prioritize Chromium results over upstream results),
so we look in both the chromium version-specific path and then the
upstream version-specific path.

I hope this helps explain things,

-- Dirk

Brett Wilson

unread,
Mar 30, 2011, 1:35:03 PM3/30/11
to dpr...@google.com, Dirk Pranke, chromium-dev, yu...@chromium.org
This is good information, is there a place we can put this on
chromium.org? Next time I need this information I probably won't have
this email.

Brett

> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
>    http://groups.google.com/a/chromium.org/group/chromium-dev
>

Dirk Pranke

unread,
Mar 30, 2011, 2:07:14 PM3/30/11
to Brett Wilson, chromium-dev, yu...@chromium.org
It probably makes more sense to put this on webkit.org somewhere, so
I'll do that and then link to it from some hopefully useful places on
chromium.org.

-- Dirk

Reply all
Reply to author
Forward
0 new messages