[cairo] Changing test suite to support differing renderings

Baz brian.ewins at gmail.com
Thu Mar 1 05:33:10 PST 2007


In the past there's been some discussion of redesigning the test suite
to support multiple different renderings better. We have variations
that occur when using different font backends, surfaces, etc. There's
also annoying flaws in the current test system - if you test a single
surface, you can end up with the test marked as a FAIL when all the
actual results were XFAIL, if one of the *untested* surfaces is
supposed to get a PASS.

I posted a small fix to let me put up atsui reference images before:
https://bugs.freedesktop.org/show_bug.cgi?id=9465
but I'd agree with Carl that more bandaids kill kittens. I'd like to
get some progress on this though because we can't get passing tests
for quartz or atsui at the moment (I assume there's problems on win32
as well).

The requirement is actually to determine the expected PASS/FAIL status
and the correct reference check (not necessarily an image comparison,
for pdf/ps/xps/svg...) based on the surface, font backend and the test
name. Possible solutions:

A) introduce a patch with more naming conventions, see above. Means
increasingly complex rules for determining which image we check, most
likely involving some cases where images are duplicated in order to
trick cairo into testing the right file. Does not deal with
fine-grained XFAILs.

B) extend cairo_test_t to include a pointer to a replacement for
cairo_ref_name_for_test_target_format(), and a function to determine
the XFAIL status of a test. Unfortunately this will very quickly
become intrusive; introducing a new surface which fails most tests
will spread these overrides throughout the test suite.

C) introduce explicit test policies, e.g. cairo-quartz-policy.c .
Functions in the test format allow for choosing a reference image,
determining the expected test status (including 'do not test'), etc.
The default expected status would be don't test (making it easy to add
tests without knowing what they'll do on untested surfaces), and the
default test image path would be the same as
cairo_ref_name_for_test_target_format calculates. This separates test
creation from the activity of making a test supported on an unusual
surface.

So, anyone got an opinion or an option D?

-Baz
(prompted by http://bugs.freedesktop.org/show_bug.cgi?id=10141)


More information about the cairo mailing list