gecko-dev/layout/tools
Andrew Halberstadt a9dd0b2e3e Bug 1325207 - [reftest] Stop treating 'skip/skip-if' as a failure type in the manifests r=kats
Currently the RefTest manifest parser has 5 possible statuses:

0 => EXPECTED_PASS
1 => EXPECTED_FAIL
2 => EXPECTED_RANDOM
3 => EXPECTED_DEATH   (aka skip)
4 => EXPECTED_FUZZY

In the manifests, the last status annotation that appears on the line will take
precedence. For example:

    skip-if(true) fails-if(true) == test1.html ref.html
    fails-if(true) skip-if(true) == test2.html ref.html

The first test will have an expected status equal to EXPECTED_FAIL, whereas the
second one will be EXPECTED_DEATH. The same holds true for any combination of
'fail/random/skip/fuzzy' annotations. This means developers need to be very
careful about the order they specify these annotations as getting the order
wrong can easily lead to unexpected behaviour.

With the introduction of defaults in bug 1616368, the risk of unexpected behaviour
is far greater. Since defaults are simply prepended to the test line, a manifest
that looks like:

    defaults skip-if(true)
    == test1.html ref.html
    fails-if(true) == test2.html ref.html

will actually skip the first test, but run the second (since the fails-if
overwrites EXPECTED_DEATH with EXPECTED_FAIL).

The root of the problem appears to be that 'skip' and 'fuzzy' are not actually
test statuses. They are modifiers that affect how we run the test, but don't
actually affect whether the test is expected to pass or fail.

Therefore, this patch solves the problem by making 'skip/skip-if' its own thing
that does not get overwritten by other failure types. In otherwords, a 'skip-if'
can appear before or after a 'fails-if' and it will have the same meaning.

Differential Revision: https://phabricator.services.mozilla.com/D64457

--HG--
extra : moz-landing-system : lando
2020-03-09 15:20:11 +00:00
..
layout-debug Bug 1602767 - Make layout debugger's paged mode use the same setup as reftest-paged. r=heycam 2019-12-11 03:46:58 +00:00
recording Bug 1596884, replace remaining .xul files in layout/tools with .xhtml r=dholbert 2019-11-20 20:40:32 +00:00
reftest Bug 1325207 - [reftest] Stop treating 'skip/skip-if' as a failure type in the manifests r=kats 2020-03-09 15:20:11 +00:00
tests