Commit graph

157 commits

Author SHA1 Message Date
Behdad Esfahbod
d5535c993b [boilerplate/test] Move vector_ignored_tests from boilerplate/ to test/ 2007-04-20 00:52:02 -04:00
Behdad Esfahbod
157074c794 [boilerplate] Add cairo_boilerplate_get/free_targets
This means, test and perf suites now share the same target handling
code, including parsing CAIRO_TEST_TARGET.
2007-04-18 19:46:30 -04:00
Behdad Esfahbod
47c02a6bd6 [boilerplate] s/_cairo_test_content_name/cairo_boilerplate_content_name/g 2007-04-18 19:15:16 -04:00
Behdad Esfahbod
9f3e0694e6 [test] Allow bypassing all test targets by setting CAIRO_TEST_TARGET=" " 2007-04-18 19:08:54 -04:00
Behdad Esfahbod
f3c8d82d6d [test] If backends are limited and all untested, pass the test
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.
2007-03-13 16:51:34 -04:00
Carl Worth
8c579ef835 More tightening of test cleanup to avoid valgrind complaints. 2007-03-02 12:30:14 -08:00
Carl Worth
b52dda62fe Augment cairo_test_init with cairo_test_fini to avoid leak
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.
2007-03-02 11:31:13 -08:00
Behdad Esfahbod
07d61af809 [paginated] Automatically issue a final cairo_show_page()
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.
2007-02-28 13:46:27 -05:00
Carl Worth
c426e71141 Hook up pdiff to the test suite now that its written in C 2006-12-14 07:58:02 -08:00
Vladimir Vukicevic
e1a8a8b65a [win32] Set win32 assertion failure handlers for tests to stderr
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.
2006-09-09 23:54:40 -07:00
Carl Worth
aeca64f6cd boilerplate: Allow targets to distinguish between test and perf.
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.
2006-09-09 17:32:50 -07:00
Carl Worth
195fd5cde6 boilerplate: Rename cairo_test_target_t to cairo_boilerplate_target_t 2006-09-09 16:04:51 -07:00
Carl Worth
bcb7863f00 Move target tolerance to cairo_test_target structure (should let single-pixel SVG errors pass)
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.
2006-09-05 22:25:21 -07:00
Carl Worth
4915e0baa7 boilerplate: Fix missing include of config.h which was preventing many backends from being tested 2006-08-31 08:36:29 -07:00
Carl Worth
d1834cca19 test: Ignore single-bit errors for SVG backend.
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.
2006-08-31 04:01:10 -07:00
Carl Worth
d52a1f762d Move test-specific stuff out of boilerplate/ and back into test/
This now gives us two separate libtool convenience libraries,
so they have to have separate names now:
libcairoboilerplate.la and libcairotest.la.
2006-08-31 01:39:06 -07:00
Carl Worth
7f4e83ceeb Split libcairotest files out from test/ and into boilerplate/
The idea here is to setup boilerplate to allow code sharing between
test/ and the upcoming perf/
2006-08-30 15:34:27 -07:00
Behdad Esfahbod
6f8cf53b1e [test] Don't use signals if signal.h is not available 2006-08-17 22:03:36 -04:00
Pavel Roskin
a06af40c35 [test] Fix warnings in tests on 64-bit systems
Cast argiments from size_t to int.  size_t is 64-bit on 64-bit systems,
which causes a warning.  The actual data should fit 32 bit comfortably.
2006-08-13 04:47:11 -04:00
Behdad Esfahbod
cecf396f6f [test] Point out to the test log file on failures 2006-08-10 15:11:46 -04:00
Behdad Esfahbod
15074cbb04 [test] Behave better if no ref image was found for a test 2006-08-10 14:58:33 -04:00
Behdad Esfahbod
67ff765e30 [test] Rename beos_bitmap target to beos-bitmap. Same for directfb-bitmap. 2006-08-10 13:53:24 -04:00
Carl Worth
cb5edb6c35 Eliminate warning due to the test suite's private 'FLATTENEND' format value 2006-08-08 01:39:12 -07:00
Behdad Esfahbod
f089a07679 Fix misplaced volatile keyword 2006-08-08 04:36:13 -04:00
Carl Worth
c3b912d7db Eliminate most compiler warnings from the test suite 2006-08-08 01:16:49 -07:00
Behdad Esfahbod
127704c225 Look for per-target reference image too 2006-08-01 20:39:56 -04:00
Behdad Esfahbod
3d95919fab Switch from ghostscript's png16m driver to pngalpha for PS->PNG again.
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.
2006-08-01 15:27:11 -04:00
Behdad Esfahbod
556a4d8405 Add vector_ignored_tests that is tests ignored for ps/pdf/svg
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.
2006-08-01 15:16:10 -04:00
Behdad Esfahbod
2fa709d6af Set font options in the test context and make tests not do that
This should help with not requiring many backend-specific reference
images, and some should be removed now.
2006-07-31 15:17:15 -04:00
Behdad Esfahbod
47d3c5a2c6 Flush stdout after writing \r, to remove artifacts. 2006-07-14 20:06:34 -04:00
Behdad Esfahbod
6a5d66f651 Go back to "!!!CRASHED!!!" message now that there's no confusion. 2006-07-13 18:53:25 -04:00
Carl Worth
4b22cb41a9 Use 'FAIL' instead of 'UNEXPECTED FAILURE' in test output.
There's no ambiguity anymore due to duplicated printing, so go
back to the classic, and easier to read wording.
2006-07-13 15:23:06 -07:00
Carl Worth
b2d04d7f1a Rename no_fail_on_stdout to eliminate confusing negative inside a Boolean variable name 2006-07-13 15:21:02 -07:00
Carl Worth
ff1280ce98 cairo-test.c: Prefer FALSE and TRUE for cairo_bool_t values. 2006-07-13 15:17:57 -07:00
Behdad Esfahbod
ebc7367306 Fix test result formatting. 2006-07-13 18:18:08 -04:00
Behdad Esfahbod
b2668e944d Use cairo_bool_t. 2006-07-13 14:02:58 -04:00
Behdad Esfahbod
09dfae5fbf Don't write FAIL messages on stdout if both stdout/err are going to screen. 2006-07-13 13:37:47 -04:00
Carl Worth
f3d45d1790 Eliminate a few simple compiler warnings 2006-07-13 10:14:26 -07:00
Behdad Esfahbod
0ac2bbbf52 Improve test HTML generation:
- Make "make retest" not generate all .log files.
- Format improvements in the generated HTML file.
2006-07-13 11:27:05 -04:00
Behdad Esfahbod
973d3a3d14 More test suite infrastructure improvements:
- 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.
2006-07-11 22:19:39 -04:00
Behdad Esfahbod
94bdbc15f7 Improve test suite build infrastructure
- 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
2006-07-11 17:27:08 -04:00
Behdad Esfahbod
95016b3274 Make CAIRO_TEST_TARGET="" make check pass tests. 2006-07-06 13:48:18 -04:00
Behdad Esfahbod
1cb0bc40a3 Do not use sighandler_t. Bug 7401. 2006-07-05 04:22:32 +02:00
Behdad Esfahbod
01b1f3572c Detect and report crashes in tests. 2006-07-01 02:07:28 +02:00
Carl Worth
80cb0d5ba1 Fix some leaks in the test suite itself. 2006-07-01 00:37:44 +02:00
Carl Worth
14e7883fae Fix a memory leak by removing accidentally duplicated code. 2006-07-01 00:00:43 +02:00
Carl Worth
d2ea21b4ae ft-text-antialias-none: Update reference images and igore list.
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.
2006-06-25 11:48:32 +02:00
Carl Worth
a3f2d92f11 PDF: Don't fallback due to CAIRO_ANTIALIAS_NONE
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.
2006-06-19 11:03:32 -07:00
Ian Osgood
6f0a85c8f7 Update the XCB backend for screen sensitivity. 2006-06-16 22:43:49 -07:00
Behdad Esfahbod
bc4a6796f8 Accept CAIRO_TEST_TARGET being empty or containing a list of backends to test.
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".
2006-06-16 19:01:20 -04:00