This is necessary to ensure that limiting backends using
CAIRO_TEST_TARGET does not increase the number of tests failing,
which is a desirable invariant.
Without this, any tests that were using cairo_test_init rather than
cairo_test would end up leaking a FILE* for the log file. So this
keeps valgrind much more happy with the test suite.
This means, PS/PDF/SVG do not need the final cairo_show_page() anymore.
If there is any drawing in the page, a cairo_show_page() is done
automatically.
assert() will default to displaying a dialog box, which makes it hard
to run tests automatically. Set the reporting mode to only report
to stderr in cairo_test(), and in path-data, since that triggers
an early assert.
Add a new cairo_boilerplate_mode_t so that the boilerplate targets can
do slightly different things if being tested for correctness vs. being
run for performance.
Previously we were setting the target tolerance based on the surface
type. But that doesn't work as multiple backends will provide a surface
of type meta. So instead we put the tolerance as a value in the
cairo_test_target data structure.
With this change, some single-pixel errors of 1 in the SVG backend
should now be ignored.
The interface of the various buffer/image_diff functions is improved to
provide the maximum pixel difference in addition to the number of pixels
that differ. This value can then be used to compare against a per-backend
tolerance.
Currently I've set the SVG backend's tolerance to 1 to handle some issues
we're currently seeing of single-bit differences on different systems, (but
we're not exactly sure why yet).
Also I improved the image_diff routines to properly report a status value
on failure rather than the bogus value of -1 for pixels_changed.
We have switched back and forth quite a few times. This time I'm switching
because with pngalpha we get gray antialiased text and graphics while with
png16m all we get is no antialiasing. This is definitely a bug in the png16m
driver, but I won't wait until it gets fixed upstream.
Previously Carl Worth switched to pngalpha and reverted it immediately in
commit c4fc7b06b5. I've now fixed image-diff to
work with the output of pngalpha, so we can switch. It requires lots of
reference image updates, but still doesn't help with reducing the number of
PS-specific reference images we need.
that includes all tests depending on CAIRO_ANTIALIAS_NONE and
CAIRO_ANTIALIAS_SUBPIXEL.
This removes separate pdf_ignored_tests and svg_ignored_tests
arrays that were out of synch and otherwise the same.
- Remove cairo_test_expect_failure. cairo-test.c now checks
env var CAIRO_XFAIL_TESTS to see if the running test is
expected to fail. The reason for expected failure is
appended to the test description.
- Test description is written out.
- Failed/crashed tests also write a line out to stderr (in red),
so one can now redirect stdout to /dev/null to only see failures.
- cairo_test() has been changed to not take the draw function
anymore, instead, draw function is now part of the test struct.
- "make check" doesn't allow limiting backends to test using env
var anymore. To limit backends to test, one should use the
TARGETS variable on the make command line.
- "make check-valgrind" now writes its log to valgrind-log instead
of valgrind.log, to not interfere with test log file processing.
- Add new target recheck, that checks only failed tests
- Add targets test and retest, and make html after (re)checking
- Make targets html and index.html lazy, only update if any tests changed
- Improve build system such that checking one test (using TESTS=...) doesn't
build all tests
- Remove pixman-rotate from XFAIL
Add a new ps reference image due to slightly different rasterization. Also
update pdf and svg backends to ignore this test since those backends do not
support ANTIALIAS_NONE.
Note in ROADMAP that bug 6759 is fixed now.
This was a gratuitous thing that was causing excessive fallbacks in
mozilla printing to PDF. The only reason it was ever there was to
get some of the tests that rely on CAIRO_ANTIALIAS_NONE to pass.
Instead we now simply don't run those tests against the PDF backend.
The list can be separated by any of space, tab, comma, colon, or semicolon.
Moreover, a CAIRO_TEST_TARGET of e.g. "glitz" matches any subtarget like
"glitz-glx".