Changes between Version 1 and Version 2 of LayoutTestsSearchPath


Ignore:
Timestamp:
Jul 7, 2011 4:18:07 PM (13 years ago)
Author:
dpranke@chromium.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LayoutTestsSearchPath

    v1 v2  
    77 * [wiki:NewRunWebKitTests]
    88 * [wiki:HackingOnNewRunWebKitTests]
     9
     10Here's the logic behind the layout test paths:
     11
     12Assume you have three tests called {{{foo}}}, {{{bar}}}, and {{{baz}}}, we're running tests on the Apple Mac port, and suppose it's 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, so:
     13
     14
     15{{{LayoutTests/platform/mac}}} contains:
     16 * {{{foo-expected.txt}}}  r1.1
     17 * {{{bar-expected.txt}}} r.1.1
     18 * {{{baz-expected.txt}}} r.1.1
     19
     20Now Snow Leopard comes out, and {{{foo}}} produces different results for some reason. When running on Snow Leopard, you want to find the new version of the file, but the same (old) version of the other two files. On the other hand, you want to make sure that when running on Leopard, you get the same (old) versions of all three files.
     21
     22We put the new file in the "future" version, and move the older file into the directory matching the last platform that passed it:
     23
     24{{{LayoutTests/platform/mac}}} contains:
     25 * {{{foo-expected.txt}}} r1.2
     26 * {{{bar-expected.txt}}} r1.1
     27 * {{{baz-expected.txt}}} r1.1
     28{{{platform/mac-leopard}}} contains:
     29 * {{{foo-expected.txt}}} r1.1
     30
     31Snow Leopard will only look in the {{{platform/mac}}} dir (and then next to the test, in the generic directories, of course), and Leopard will look in {{{platform/mac-leopard}}}, then {{{platform/mac}}}.
     32
     33Now Lion comes out, {{{bar}}} produces different output, and {{{foo}}} also produces different output (again). We can leave the {{{platform/mac-leopard}}} directory alone, and create a new {{{platform/mac-snowleopard}}} directory, and only have to move the two failing tests there:
     34
     35{{{platform/mac}}} contains:
     36 * {{{foo-expected.txt}}} r1.3
     37 * {{{bar-expected.txt}}} r1.2
     38 * {{{baz-expected.txt}}} r1.1
     39{{{platform/mac-snowleopard}}} contains:
     40 * {{{foo-expected.txt}}} r1.2
     41 * {{{bar-expected.txt}}} r1.1
     42{{{platform/mac-leopard}}} contains (as before):
     43 * {{{foo-expected.txt}}} r1.1
     44
     45Lion only looks in platform/mac, SL looks in platform/mac-snowleopard, then platform/mac, and Leopard looks in platform/mac-leopard, then platform/mac-snowleopard, then platform/mac.
     46
     47If 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
     48to 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.
     49
     50Another 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).
     51So, 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).
     52
     53== Chromium-specific notes ==
     54
     55The Chromium port tries to match the Apple baselines where possible (but we prioritize Chromium results over upstream results), so we look in both the chromium version-specific path and then the Apple version-specific path.