Commit graph

30 commits

Author SHA1 Message Date
Chris Wilson
992f74d884 [test] Use '.' as the field separator in the names
We frequently use '-' within the test name or format name and so we
encounter confusion as '-' is also used as the field separator. At times
this has caused a new test to break an old test because the new test would
match one of the old test's target specific reference images. So switch
everything over to use '.' between fields (test name, target, format,
subtest, etc.).
2008-10-31 13:50:55 +00:00
Chris Wilson
e90073f7dd [test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one
binary from all the sources.

This binary is then given the task of choosing tests to run (based on user
selection and individual test requirement), forking each test into its own
process and accumulating the results.
2008-10-31 12:30:11 +00:00
Adrian Johnson
ff9ee74b37 Revert unintended changes to test/fallback-resolution.c in the previous commit 2008-10-16 17:29:33 +10:30
Adrian Johnson
5911c6966d Use correct inverse ctm for stroke in meta surface replay
This fixes #9189 Dashed strokes too long in fallback images
2008-10-16 17:22:48 +10:30
Chris Wilson
595414bb78 [test/fallback-resolution] Extend to cover separate ppi x/y.
Adrian Johnson proposed a hack that fixed the current test by simply
scaling the dashed stroke by device_transform.xx. Obviously this exposes a
deficiency in the test case. So add an outer loop to iterate over several
common ppi for both x and y and in doing so reveal more ugly artifacts in
the current fallback code.
2008-10-14 14:24:49 +01:00
Chris Wilson
4f449107af [test/fallback-resolution] Exercise a couple of outstanding bugs.
Use dashes to exercise bugs:
  https://bugs.freedesktop.org/show_bug.cgi?id=9189
  https://bugs.freedesktop.org/show_bug.cgi?id=17223
Note bug 17223 indicates that this is still relevant for win32 printing
where fallbacks are used if the dash offset is non-zero.

And use a pattern to exercise the (fixed) regression:
  https://bugs.launchpad.net/inkscape/+bug/234546
2008-09-28 21:05:36 +01:00
Chris Wilson
9841d9d58e Automate error checking for fallback-resolution.
For this we extend the boilerplate get_image() routines to extract a
single page out of a paginated document and then proceed to manually
check each page of the fallback-resolution test.

(Well that's the theory, in practice SVG doesn't support multiple pages
and so we just generate a new surface for each resolution. But the
infrastructure is in place so that we can automate other tests,
e.g. test/multi-pages.)
2008-09-28 14:57:12 +01:00
Chris Wilson
cca1fc6358 [test] Fix target specific tests for recent SVG/PS version split.
A few tests explicitly checked whether the "ps" or "svg" target was
enabled and this broke because of the name change. So fixup, to run
the generic test if either PS or SVG target is enabled as appropriate.
2008-09-27 21:53:21 +01:00
Chris Wilson
517e532fb7 [test] Run fallback-resolution if we have at least one vector surface.
Currently fallback-resolution is included in the test suite if we have all
of the vector surfaces available. This commit enables individual support
for the vector surfaces, so that the test can be run even if one or more
of the surfaces are not available.
2008-08-13 22:01:39 +01:00
Chris Wilson
d56ea9cc87 [test] Set CAIRO_TEST_UNTESTED to 77
77 is the magic exit code used by automake to indicate a skipped test, so
by using it we can get a slightly more informative test log.
2008-08-13 21:55:19 +01:00
Chris Wilson
f85a4aec1f [test] Export a function to check whether a target is enabled.
Allow individuals tests to check whether a test target is enabled -
useful for those tests that circumvent cairo_test() and perform
feature testing.
2008-08-13 21:55:09 +01:00
Chris Wilson
436c0c8be2 [test] Preparatory work for running under memfault.
In order to run under memfault, the framework is first extended to handle
running concurrent tests - i.e. multi-threading. (Not that this is a
requirement for memfault, instead it shares a common goal of storing
per-test data).  To that end all the global data is moved into a per-test
context and the targets are adjusted to avoid overlap on shared, global
resources (such as output files and frame buffers). In order to preserve
the simplicity of the standard draw routines, the context is not passed
explicitly as a parameter to the routines, but is instead attached to the
cairo_t via the user_data.

For the masochist, to enable the tests to be run across multiple threads
simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired
number.

In the long run, we can hope the need for memfault (runtime testing of
error paths) will be mitigated by static analysis. A promising candidate
for this task would appear to be http://hal.cs.berkeley.edu/cil/.
2008-08-13 21:54:59 +01:00
Carl Worth
8efb103600 Extend fallback-resolution test to expose bug with groups
Groups appear to always be rendered with a fallback resolution of
72.0 ppi rather than the desired fallback resolution.
2008-05-21 10:23:37 -07:00
Behdad Esfahbod
570714b2b4 [test/fallback-resolution] set tolerance to a large value to see how it performs
in different fallback resolutions.
2007-11-05 13:23:40 -05:00
Behdad Esfahbod
5acbef2021 [test] fallback-resolution: center text 2007-11-05 13:23:35 -05:00
Chris Wilson
43645eb486 [test/fallback-resolution] Cleanup after test failure
Be valgrind clean even for test failures.
2007-05-08 22:04:41 +01:00
Behdad Esfahbod
d2bb5f3007 [svg] Get rid of _cairo_svg_test_force_fallbacks
in favor of cairo_boilerplate_svg_surface_force_fallbacks.
2007-04-21 03:08:26 -04:00
Behdad Esfahbod
3885fff3e6 [ps] Get rid of _cairo_ps_test_force_fallbacks
in favor of cairo_boilerplate_ps_surface_force_fallbacks.
2007-04-21 02:51:22 -04:00
Behdad Esfahbod
20ce190e71 [pdf] Get rid of _cairo_pdf_test_force_fallbacks
in favor of cairo_boilerplate_pdf_surface_force_fallbacks.
2007-04-21 02:50:53 -04:00
Carl Worth
8c579ef835 More tightening of test cleanup to avoid valgrind complaints. 2007-03-02 12:30:14 -08:00
Emmanuel Pacaud
4f02395267 Use SVG multipage capability. 2006-11-12 20:45:50 +01:00
Carl Worth
c3b912d7db Eliminate most compiler warnings from the test suite 2006-08-08 01:16:49 -07: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
195b1142e7 Prefix "cairo_*_test_*" symbols with underscore. 2006-06-29 15:22:44 +02:00
Carl Worth
651b2a9ab0 test/fallback-resolution: Remove extra call to cairo_show_page 2006-06-19 21:16:03 -07:00
Carl Worth
0662928e4f Clarify that fallback_resolution acts on a per-page granularity.
This explains why the SVG result from the fallback-resolution test
doesn't actually show multiple resolutions in effect at the same time.
2006-06-10 09:44:30 -07:00
Carl Worth
13ba5316fb Test PS and SVG backends in addition to PDF in test/fallback-resolution. 2006-06-10 09:15:31 -07:00
Carl Worth
ebb53b2572 Add text and stroke to falback-resolution test (showing bugs in each). 2006-06-10 08:21:18 -07:00
Carl Worth
b2f274b3e8 New API: Replace cairo_{ps,pdf,svg}_set_dpi with new cairo_surface_set_fallback_resolution.
This just provides the mechanics for storing the value and removing the old
function calls. The new value is still not used anywhere (though nor where
the old values), so there should be no functional change (other than forcing
any programs calling the old API to be updated).
2006-06-09 16:52:17 -07:00
Carl Worth
0796845ae6 Add new fallback-resolution test for bug in cairo_pdf_surface_set_dpi 2006-05-24 14:03:49 -07:00