[test/Makefile.am] EXTRA_DIST += create-from-png*-ref.png
[cairo/haiku.git] / test / Makefile.am
blob11880cbfd82545fe3c89612c9b780c3362b3dab1
1 SUBDIRS=pdiff .
3 # Here are all the tests that are run unconditionally
4 TESTS =                                                 \
5 a1-image-sample$(EXEEXT)                                \
6 a1-mask$(EXEEXT)                                        \
7 a1-traps-sample$(EXEEXT)                                \
8 a8-mask$(EXEEXT)                                        \
9 big-line$(EXEEXT)                                       \
10 big-trap$(EXEEXT)                                       \
11 bilevel-image$(EXEEXT)                                  \
12 caps-joins$(EXEEXT)                                     \
13 caps-joins-alpha$(EXEEXT)                               \
14 caps-sub-paths$(EXEEXT)                                 \
15 clip-all$(EXEEXT)                                       \
16 clip-empty$(EXEEXT)                                     \
17 clip-fill-rule$(EXEEXT)                                 \
18 clip-fill-rule-pixel-aligned$(EXEEXT)                   \
19 clip-nesting$(EXEEXT)                                   \
20 clip-operator$(EXEEXT)                                  \
21 clip-push-group$(EXEEXT)                                \
22 clip-twice$(EXEEXT)                                     \
23 clip-zero$(EXEEXT)                                      \
24 close-path$(EXEEXT)                                     \
25 composite-integer-translate-source$(EXEEXT)             \
26 composite-integer-translate-over$(EXEEXT)               \
27 composite-integer-translate-over-repeat$(EXEEXT)        \
28 copy-path$(EXEEXT)                                      \
29 create-for-stream$(EXEEXT)                              \
30 create-from-png$(EXEEXT)                                \
31 create-from-png-stream$(EXEEXT)                         \
32 dash-caps-joins$(EXEEXT)                                \
33 dash-curve$(EXEEXT)                                     \
34 dash-no-dash$(EXEEXT)                                   \
35 dash-offset-negative$(EXEEXT)                           \
36 dash-scale$(EXEEXT)                                     \
37 dash-state$(EXEEXT)                                     \
38 dash-zero-length$(EXEEXT)                               \
39 degenerate-path$(EXEEXT)                                \
40 degenerate-pen$(EXEEXT)                                 \
41 device-offset$(EXEEXT)                                  \
42 device-offset-positive$(EXEEXT)                         \
43 extend-pad$(EXEEXT)                                     \
44 extend-reflect$(EXEEXT)                                 \
45 extend-reflect-similar$(EXEEXT)                         \
46 extend-repeat$(EXEEXT)                                  \
47 extend-repeat-similar$(EXEEXT)                          \
48 fill-and-stroke$(EXEEXT)                                \
49 fill-and-stroke-alpha$(EXEEXT)                          \
50 fill-and-stroke-alpha-add$(EXEEXT)                      \
51 fill-degenerate-sort-order$(EXEEXT)                     \
52 fill-missed-stop$(EXEEXT)                               \
53 fill-rule$(EXEEXT)                                      \
54 filter-bilinear-extents$(EXEEXT)                        \
55 filter-nearest-offset$(EXEEXT)                          \
56 finer-grained-fallbacks$(EXEEXT)                        \
57 font-face-get-type$(EXEEXT)                             \
58 font-matrix-translation$(EXEEXT)                        \
59 font-options$(EXEEXT)                                   \
60 glyph-cache-pressure$(EXEEXT)                           \
61 get-and-set$(EXEEXT)                                    \
62 get-clip$(EXEEXT)                                       \
63 get-group-target$(EXEEXT)                               \
64 get-path-extents$(EXEEXT)                               \
65 gradient-alpha$(EXEEXT)                                 \
66 gradient-zero-stops$(EXEEXT)                            \
67 group-paint$(EXEEXT)                                    \
68 image-surface-source$(EXEEXT)                           \
69 infinite-join$(EXEEXT)                                  \
70 in-fill-empty-trapezoid$(EXEEXT)                        \
71 in-fill-trapezoid$(EXEEXT)                              \
72 invalid-matrix$(EXEEXT)                                 \
73 large-source$(EXEEXT)                                   \
74 leaky-dash$(EXEEXT)                                     \
75 leaky-polygon$(EXEEXT)                                  \
76 line-width$(EXEEXT)                                     \
77 line-width-scale$(EXEEXT)                               \
78 line-width-zero$(EXEEXT)                                \
79 linear-gradient$(EXEEXT)                                \
80 linear-gradient-reflect$(EXEEXT)                        \
81 long-dashed-lines$(EXEEXT)                              \
82 long-lines$(EXEEXT)                                     \
83 mask$(EXEEXT)                                           \
84 mask-alpha$(EXEEXT)                                     \
85 mask-ctm$(EXEEXT)                                       \
86 mask-surface-ctm$(EXEEXT)                               \
87 meta-surface-pattern$(EXEEXT)                           \
88 miter-precision$(EXEEXT)                                \
89 move-to-show-surface$(EXEEXT)                           \
90 new-sub-path$(EXEEXT)                                   \
91 nil-surface$(EXEEXT)                                    \
92 operator-clear$(EXEEXT)                                 \
93 operator-source$(EXEEXT)                                \
94 over-above-source$(EXEEXT)                              \
95 over-around-source$(EXEEXT)                             \
96 over-below-source$(EXEEXT)                              \
97 over-between-source$(EXEEXT)                            \
98 paint$(EXEEXT)                                          \
99 paint-repeat$(EXEEXT)                                   \
100 paint-source-alpha$(EXEEXT)                             \
101 paint-with-alpha$(EXEEXT)                               \
102 pattern-get-type$(EXEEXT)                               \
103 pattern-getters$(EXEEXT)                                \
104 pixman-rotate$(EXEEXT)                                  \
105 png$(EXEEXT)                                            \
106 push-group$(EXEEXT)                                     \
107 radial-gradient$(EXEEXT)                                \
108 random-intersections$(EXEEXT)                           \
109 rectangle-rounding-error$(EXEEXT)                       \
110 rectilinear-miter-limit$(EXEEXT)                        \
111 rectilinear-stroke$(EXEEXT)                             \
112 reflected-stroke$(EXEEXT)                               \
113 rel-path$(EXEEXT)                                       \
114 rgb24-ignore-alpha$(EXEEXT)                             \
115 rotate-image-surface-paint$(EXEEXT)                     \
116 scale-down-source-surface-paint$(EXEEXT)                \
117 scale-source-surface-paint$(EXEEXT)                     \
118 stroke-ctm-caps$(EXEEXT)                                \
119 stroke-image$(EXEEXT)                                   \
120 select-font-face$(EXEEXT)                               \
121 select-font-no-show-text$(EXEEXT)                       \
122 self-copy$(EXEEXT)                                      \
123 self-intersecting$(EXEEXT)                              \
124 set-source$(EXEEXT)                                     \
125 show-text-current-point$(EXEEXT)                        \
126 skew-extreme$(EXEEXT)                                   \
127 smask$(EXEEXT)                                          \
128 smask-fill$(EXEEXT)                                     \
129 smask-image-mask$(EXEEXT)                               \
130 smask-mask$(EXEEXT)                                     \
131 smask-paint$(EXEEXT)                                    \
132 smask-stroke$(EXEEXT)                                   \
133 smask-text$(EXEEXT)                                     \
134 solid-pattern-cache-stress$(EXEEXT)                     \
135 source-clip$(EXEEXT)                                    \
136 source-clip-scale$(EXEEXT)                              \
137 source-surface-scale-paint$(EXEEXT)                     \
138 surface-finish-twice$(EXEEXT)                           \
139 surface-pattern$(EXEEXT)                                \
140 surface-pattern-big-scale-down$(EXEEXT)                 \
141 surface-pattern-scale-down$(EXEEXT)                     \
142 surface-pattern-scale-up$(EXEEXT)                       \
143 text-antialias-gray$(EXEEXT)                            \
144 text-antialias-none$(EXEEXT)                            \
145 text-antialias-subpixel$(EXEEXT)                        \
146 text-cache-crash$(EXEEXT)                               \
147 text-pattern$(EXEEXT)                                   \
148 text-rotate$(EXEEXT)                                    \
149 text-transform$(EXEEXT)                                 \
150 text-zero-len$(EXEEXT)                                  \
151 transforms$(EXEEXT)                                     \
152 translate-show-surface$(EXEEXT)                         \
153 trap-clip$(EXEEXT)                                      \
154 truetype-tables$(EXEEXT)                                \
155 unantialiased-shapes$(EXEEXT)                           \
156 unbounded-operator$(EXEEXT)                             \
157 user-data$(EXEEXT)                                      \
158 zero-alpha$(EXEEXT)
160 # XXX: Here are some existing tests that are currently disabled for
161 # one reason or another. They can still be built and run (manually)
162 # but we don't currently run them as part of 'make check' to avoid
163 # inflicting some particularly nasty problems on the user of the test
164 # suite (described below).
166 # It would definitely be worthwhile to address these problems so that
167 # these tests can get back into the test suite proper, (since the
168 # problems do indicated bugs somewhere and we're less likely to get
169 # those bugs fixed without the attention due to having these tests in
170 # the suite).
172 # The reasons for disabling the tests are as follows:
174 # extend-reflect - Triggers an infinite (or near-infinite) bug in some
175 #       X servers in some circumstances. Details and cause unknown.
177 # show-glyphs-many - This stress test was exercising a particular bug
178 #       in the xlib surface code (exceeding the X11 protocol request
179 #       limit) when rendering several thousand glyphs at once. The
180 #       original xlib-surface bug is fixed now, but the test continues
181 #       to stress some other aspects of the test suite. For example,
182 #       when doing text as paths, the resuilting PostScript file is one
183 #       giant path that ghostscript has a particularly hard time
184 #       with. I'm disabling this test for now, since I don't care about
185 #       that performance problem in ghostscript. (But, there is a
186 #       similar performance problem when using cairo to rasterize the
187 #       equivalen giant path---from an SVG files say---so this might be
188 #       a useful kind of test to bring back again for performance (not
189 #       correctness) testing.
190 # text-glyph-range - This test triggers the following assertion in cairo:
192 #       lt-text-glyph-range: cairo-scaled-font-subsets.c:350:
193 #       _cairo_sub_font_collect: Assertion `collection->num_glyphs ==
194 #       collection->max_glyph + 1' failed.
196 #       And as a result causes a failure to be recorded by the test
197 #       suite, (in spite of the XFAIL status of the test). So maybe
198 #       that's just a bug in the test rig that should just consider
199 #       the abort an XFAIL like any other.
200 DISABLED_TESTS =                        \
201 show-glyphs-many$(EXEEXT)               \
202 text-glyph-range$(EXEEXT)
204 # Then we have a collection of tests that are only run if certain
205 # features are compiled into cairo
206 if HAVE_PTHREAD
207 TESTS += pthread-show-text$(EXEEXT)
208 endif
210 if CAIRO_HAS_FT_FONT
211 TESTS += bitmap-font$(EXEEXT)
212 TESTS += ft-font-create-for-ft-face$(EXEEXT)
213 TESTS += ft-show-glyphs-positioning$(EXEEXT)
214 TESTS += ft-show-glyphs-table$(EXEEXT)
215 TESTS += ft-text-vertical-layout-type1$(EXEEXT)
216 TESTS += ft-text-vertical-layout-type3$(EXEEXT)
217 TESTS += ft-text-antialias-none$(EXEEXT)
218 endif
220 # Need to add win32-surface-source, quartz-surface-source
221 if CAIRO_HAS_GLITZ_SURFACE
222 TESTS += glitz-surface-source$(EXEEXT)
223 endif
225 if CAIRO_HAS_PDF_SURFACE
226 TESTS += pdf-features$(EXEEXT)
227 TESTS += pdf-surface-source$(EXEEXT)
228 endif
230 if CAIRO_HAS_PS_SURFACE
231 TESTS += ps-features$(EXEEXT)
232 TESTS += ps-surface-source$(EXEEXT)
233 endif
235 if CAIRO_HAS_SVG_SURFACE
236 TESTS += svg-surface$(EXEEXT)
237 TESTS += svg-clip$(EXEEXT)
238 TESTS += svg-surface-source$(EXEEXT)
239 endif
241 if CAIRO_HAS_XLIB_SURFACE
242 TESTS += xlib-expose-event$(EXEEXT)
243 TESTS += xlib-surface$(EXEEXT)
244 TESTS += xlib-surface-source$(EXEEXT)
245 endif
247 if CAIRO_HAS_XLIB_XRENDER_SURFACE
248 TESTS += get-xrender-format$(EXEEXT)
249 endif
251 if CAIRO_HAS_MULTI_PAGE_SURFACES
252 TESTS += multi-page$(EXEEXT)
253 endif
255 if CAIRO_HAS_SVG_SURFACE
256 if CAIRO_HAS_PDF_SURFACE
257 if CAIRO_HAS_PS_SURFACE
258 TESTS += fallback-resolution$(EXEEXT)
259 endif
260 endif
261 endif
263 # All tests which have a reference image go here.
264 REFERENCE_IMAGES = \
265         a1-image-sample-ref.png         \
266         a1-mask-ref.png \
267         a1-traps-sample-ref.png         \
268         a8-mask-ref.png \
269         big-line-ref.png                \
270         big-line-rgb24-ref.png          \
271         big-line-ps-ref.png             \
272         big-line-ps-rgb24-ref.png       \
273         big-line-quartz-ref.png         \
274         big-line-quartz-rgb24-ref.png   \
275         bilevel-image-ref.png           \
276         bitmap-font-pdf-argb32-ref.png  \
277         bitmap-font-ref.png     \
278         bitmap-font-rgb24-ref.png       \
279         caps-joins-alpha-quartz-ref.png \
280         caps-joins-alpha-ref.png        \
281         caps-joins-alpha-svg-ref.png    \
282         caps-joins-ref.png      \
283         caps-joins-ps-ref.png   \
284         caps-sub-paths-ref.png  \
285         clip-all-ref.png        \
286         clip-empty-ref.png      \
287         clip-fill-rule-pixel-aligned-ref.png    \
288         clip-fill-rule-pixel-aligned-rgb24-ref.png      \
289         clip-fill-rule-ps-argb32-ref.png        \
290         clip-fill-rule-ps-rgb24-ref.png         \
291         clip-fill-rule-ref.png  \
292         clip-fill-rule-rgb24-ref.png    \
293         clip-nesting-ps-argb32-ref.png  \
294         clip-nesting-ps-rgb24-ref.png   \
295         clip-nesting-quartz-ref.png     \
296         clip-nesting-quartz-rgb24-ref.png       \
297         clip-nesting-ref.png    \
298         clip-nesting-rgb24-ref.png      \
299         clip-operator-ref.png   \
300         clip-operator-pdf-argb32-ref.png \
301         clip-operator-pdf-rgb24-ref.png \
302         clip-operator-ps-argb32-ref.png \
303         clip-operator-ps-rgb24-ref.png  \
304         clip-operator-rgb24-ref.png     \
305         clip-operator-quartz-ref.png    \
306         clip-operator-quartz-rgb24-ref.png      \
307         clip-push-group-ps-argb32-ref.png       \
308         clip-push-group-ps-rgb24-ref.png        \
309         clip-push-group-quartz-ref.png  \
310         clip-push-group-ref.png \
311         clip-twice-ps-argb32-ref.png    \
312         clip-twice-ps-rgb24-ref.png     \
313         clip-twice-quartz-ref.png       \
314         clip-twice-quartz-rgb24-ref.png \
315         clip-twice-ref.png      \
316         clip-twice-rgb24-ref.png        \
317         close-path-ref.png      \
318         close-path-ps-ref.png   \
319         composite-integer-translate-over-ref.png        \
320         composite-integer-translate-over-repeat-ref.png \
321         composite-integer-translate-source-ref.png      \
322         copy-path-ps-ref.png    \
323         copy-path-ref.png       \
324         create-from-png-ref.png                 \
325         create-from-png-alpha-ref.png           \
326         create-from-png-gray-ref.png            \
327         create-from-png-gray-alpha-ref.png      \
328         create-from-png-indexed-ref.png         \
329         create-from-png-indexed-alpha-ref.png   \
330         create-from-png-stream-ref.png  \
331         dash-caps-joins-ps-argb32-ref.png       \
332         dash-caps-joins-ps-rgb24-ref.png        \
333         dash-caps-joins-quartz-ref.png  \
334         dash-caps-joins-ref.png \
335         dash-curve-ref.png      \
336         dash-curve-ps-ref.png \
337         dash-curve-quartz-ref.png \
338         dash-no-dash-ref.png    \
339         dash-offset-negative-ref.png    \
340         dash-scale-ps-argb32-ref.png    \
341         dash-scale-ps-rgb24-ref.png     \
342         dash-scale-quartz-ref.png       \
343         dash-scale-ref.png      \
344         dash-state-ps-ref.png   \
345         dash-state-ref.png      \
346         dash-state-quartz-ref.png       \
347         dash-zero-length-ps-ref.png     \
348         dash-zero-length-ps-rgb24-ref.png       \
349         dash-zero-length-ref.png        \
350         dash-zero-length-rgb24-ref.png  \
351         degenerate-pen-ref.png          \
352         degenerate-pen-ps-ref.png       \
353         degenerate-pen-quartz-ref.png   \
354         degenerate-path-ps-argb32-ref.png       \
355         degenerate-path-ps-rgb24-ref.png        \
356         degenerate-path-ref.png \
357         degenerate-path-rgb24-ref.png   \
358         degenerate-path-quartz-ref.png  \
359         degenerate-path-quartz-rgb24-ref.png    \
360         device-offset-positive-ref.png  \
361         device-offset-positive-rgb24-ref.png    \
362         device-offset-ref.png   \
363         device-offset-rgb24-ref.png     \
364         extend-pad-ref.png      \
365         extend-reflect-ref.png  \
366         extend-reflect-similar-ref.png  \
367         extend-reflect-similar-ps-ref.png       \
368         extend-reflect-ps-ref.png \
369         extend-repeat-ref.png   \
370         extend-repeat-similar-ref.png   \
371         fill-and-stroke-alpha-add-quartz-ref.png        \
372         fill-and-stroke-alpha-add-ref.png       \
373         fill-and-stroke-alpha-quartz-ref.png    \
374         fill-and-stroke-alpha-ref.png   \
375         fill-and-stroke-ps-argb32-ref.png       \
376         fill-and-stroke-ps-rgb24-ref.png        \
377         fill-and-stroke-quartz-ref.png  \
378         fill-and-stroke-quartz-rgb24-ref.png    \
379         fill-and-stroke-ref.png \
380         fill-and-stroke-rgb24-ref.png   \
381         fill-degenerate-sort-order-quartz-ref.png       \
382         fill-degenerate-sort-order-quartz-rgb24-ref.png \
383         fill-degenerate-sort-order-ref.png      \
384         fill-degenerate-sort-order-rgb24-ref.png        \
385         fill-missed-stop-ps-argb32-ref.png      \
386         fill-missed-stop-ps-rgb24-ref.png       \
387         fill-missed-stop-ref.png        \
388         fill-missed-stop-rgb24-ref.png  \
389         fill-rule-ps-argb32-ref.png     \
390         fill-rule-quartz-ref.png        \
391         fill-rule-quartz-rgb24-ref.png  \
392         fill-rule-ref.png       \
393         fill-rule-rgb24-ref.png \
394         fill-rule-ps-rgb24-ref.png \
395         filter-bilinear-extents-ref.png \
396         filter-nearest-offset-ref.png   \
397         finer-grained-fallbacks-ref.png                 \
398         finer-grained-fallbacks-rgb24-ref.png           \
399         finer-grained-fallbacks-ps-argb32-ref.png       \
400         finer-grained-fallbacks-ps-rgb24-ref.png        \
401         font-matrix-translation-ps-argb32-ref.png       \
402         font-matrix-translation-ps-rgb24-ref.png        \
403         font-matrix-translation-ref.png \
404         font-matrix-translation-svg-ref.png     \
405         font-matrix-translation-quartz-ref.png \
406         ft-text-antialias-none-ps-argb32-ref.png        \
407         ft-text-antialias-none-ref.png  \
408         ft-show-glyphs-positioning-ref.png              \
409         ft-show-glyphs-positioning-pdf-ref.png          \
410         ft-show-glyphs-positioning-ps-ref.png           \
411         ft-show-glyphs-positioning-svg-ref.png          \
412         ft-show-glyphs-table-ref.png                    \
413         ft-show-glyphs-table-ps-ref.png                 \
414         ft-text-vertical-layout-type1-pdf-ref.png       \
415         ft-text-vertical-layout-type1-ps-ref.png        \
416         ft-text-vertical-layout-type1-ref.png   \
417         ft-text-vertical-layout-type1-svg-ref.png       \
418         ft-text-vertical-layout-type3-pdf-ref.png       \
419         ft-text-vertical-layout-type3-ps-ref.png        \
420         ft-text-vertical-layout-type3-ref.png   \
421         ft-text-vertical-layout-type3-svg-ref.png       \
422         get-group-target-ref.png        \
423         glitz-surface-source-ref.png \
424         glyph-cache-pressure-ref.png    \
425         glyph-cache-pressure-ps-ref.png \
426         glyph-cache-pressure-quartz-ref.png     \
427         gradient-alpha-pdf-argb32-ref.png       \
428         gradient-alpha-pdf-rgb24-ref.png        \
429         gradient-alpha-ps-argb32-ref.png        \
430         gradient-alpha-ps-rgb24-ref.png \
431         gradient-alpha-ref.png  \
432         gradient-alpha-rgb24-ref.png    \
433         gradient-zero-stops-ref.png     \
434         gradient-zero-stops-rgb24-ref.png       \
435         group-paint-ref.png     \
436         image-surface-source-ref.png \
437         infinite-join-ref.png   \
438         infinite-join-ps-ref.png        \
439         large-source-ref.png    \
440         leaky-dash-ps-argb32-ref.png    \
441         leaky-dash-ps-rgb24-ref.png     \
442         leaky-dash-quartz-ref.png       \
443         leaky-dash-ref.png      \
444         leaky-polygon-ref.png   \
445         leaky-polygon-ps-ref.png        \
446         linear-gradient-reflect-ref.png \
447         linear-gradient-reflect-pdf-argb32-ref.png      \
448         linear-gradient-reflect-pdf-rgb24-ref.png       \
449         linear-gradient-reflect-ps-ref.png      \
450         linear-gradient-reflect-quartz-ref.png  \
451         linear-gradient-pdf-ref.png     \
452         linear-gradient-ps-ref.png      \
453         linear-gradient-quartz-ref.png  \
454         linear-gradient-ref.png \
455         linear-gradient-svg-ref.png     \
456         line-width-ref.png      \
457         line-width-scale-ps-ref.png     \
458         line-width-scale-quartz-ref.png \
459         line-width-scale-ref.png        \
460         long-dashed-lines-ref.png       \
461         long-dashed-lines-ps-ref.png    \
462         long-dashed-lines-quartz-ref.png        \
463         long-lines-ref.png      \
464         mask-alpha-ref.png      \
465         mask-alpha-svg-argb32-ref.png   \
466         mask-alpha-rgb24-ref.png        \
467         mask-alpha-quartz-argb32-ref.png \
468         mask-ctm-ref.png        \
469         mask-ctm-rgb24-ref.png  \
470         mask-ctm-svg-argb32-ref.png     \
471         mask-ref.png    \
472         mask-rgb24-ref.png      \
473         mask-pdf-argb32-ref.png \
474         mask-pdf-rgb24-ref.png  \
475         mask-quartz-ref.png     \
476         mask-quartz-rgb24-ref.png       \
477         mask-surface-ctm-ref.png        \
478         mask-surface-ctm-rgb24-ref.png  \
479         mask-surface-ctm-svg-argb32-ref.png     \
480         mask-svg-rgb24-ref.png  \
481         mask-svg-argb32-ref.png \
482         meta-surface-pattern-ref.png            \
483         meta-surface-pattern-rgb24-ref.png      \
484         meta-surface-pattern-pdf-ref.png        \
485         meta-surface-pattern-pdf-rgb24-ref.png  \
486         meta-surface-pattern-ps-argb32-ref.png  \
487         meta-surface-pattern-ps-rgb24-ref.png   \
488         meta-surface-pattern-quartz-ref.png     \
489         meta-surface-pattern-quartz-rgb24-ref.png       \
490         meta-surface-pattern-svg-argb32-ref.png \
491         meta-surface-pattern-svg-rgb24-ref.png  \
492         miter-precision-ref.png \
493         move-to-show-surface-ref.png    \
494         new-sub-path-ps-argb32-ref.png  \
495         new-sub-path-ps-rgb24-ref.png   \
496         new-sub-path-quartz-ref.png     \
497         new-sub-path-quartz-rgb24-ref.png       \
498         new-sub-path-ref.png    \
499         new-sub-path-rgb24-ref.png      \
500         nil-surface-ref.png     \
501         nil-surface-rgb24-ref.png       \
502         operator-clear-quartz-ref.png   \
503         operator-clear-quartz-rgb24-ref.png     \
504         operator-clear-ref.png  \
505         operator-clear-rgb24-ref.png    \
506         operator-clear-pdf-argb32-ref.png       \
507         operator-clear-pdf-rgb24-ref.png        \
508         operator-clear-ps-argb32-ref.png        \
509         operator-source-pdf-argb32-ref.png      \
510         operator-source-pdf-rgb24-ref.png       \
511         operator-source-ps-argb32-ref.png       \
512         operator-source-ps-rgb24-ref.png        \
513         operator-source-ref.png \
514         operator-source-rgb24-ref.png   \
515         operator-source-quartz-ref.png \
516         operator-source-quartz-rgb24-ref.png \
517         over-above-source-ps-argb32-ref.png       \
518         over-above-source-quartz-ref.png          \
519         over-above-source-quartz-rgb24-ref.png    \
520         over-above-source-ref.png                 \
521         over-above-source-rgb24-ref.png           \
522         over-around-source-ps-argb32-ref.png       \
523         over-around-source-quartz-ref.png          \
524         over-around-source-quartz-rgb24-ref.png    \
525         over-around-source-ref.png                 \
526         over-around-source-rgb24-ref.png           \
527         over-below-source-ps-argb32-ref.png       \
528         over-below-source-ref.png                 \
529         over-below-source-rgb24-ref.png           \
530         over-between-source-ps-argb32-ref.png     \
531         over-between-source-quartz-ref.png        \
532         over-between-source-quartz-rgb24-ref.png  \
533         over-between-source-ref.png                 \
534         over-between-source-rgb24-ref.png           \
535         paint-ref.png   \
536         paint-repeat-ref.png    \
537         paint-source-alpha-pdf-argb32-ref.png   \
538         paint-source-alpha-ref.png      \
539         paint-source-alpha-svg-ref.png  \
540         paint-with-alpha-ref.png        \
541         paint-with-alpha-svg-ref.png    \
542         paint-source-alpha-pdf-ref.png \
543         paint-with-alpha-pdf-ref.png \
544         pattern-getters-ref.png \
545         pdf-surface-source-ref.png \
546         pixman-rotate-ref.png   \
547         pixman-rotate-rgb24-ref.png     \
548         ps-surface-source-ref.png \
549         push-group-pdf-ref.png \
550         push-group-pdf-rgb24-ref.png \
551         push-group-ref.png      \
552         push-group-rgb24-ref.png        \
553         push-group-svg-argb32-ref.png   \
554         radial-gradient-ref.png \
555         radial-gradient-pdf-ref.png \
556         radial-gradient-quartz-ref.png \
557         radial-gradient-svg-ref.png     \
558         random-intersections-ref.png    \
559         random-intersections-ps-ref.png \
560         random-intersections-quartz-ref.png \
561         rgb24-ignore-alpha-ref.png \
562         rectangle-rounding-error-ref.png        \
563         rectilinear-miter-limit-ref.png         \
564         rectilinear-miter-limit-ps-ref.png      \
565         rectilinear-stroke-ref.png      \
566         reflected-stroke-ref.png        \
567         reflected-stroke-ps-ref.png     \
568         reflected-stroke-quartz-ref.png \
569         rel-path-quartz-ref.png \
570         rel-path-quartz-rgb24-ref.png   \
571         rel-path-ps-rgb24-ref.png       \
572         rel-path-ref.png        \
573         rel-path-rgb24-ref.png  \
574         rotate-image-surface-paint-pdf-rgb24-ref.png \
575         rotate-image-surface-paint-ps-ref.png \
576         rotate-image-surface-paint-pdf-argb32-ref.png   \
577         rotate-image-surface-paint-quartz-ref.png       \
578         rotate-image-surface-paint-ref.png      \
579         rotate-image-surface-paint-svg-ref.png  \
580         scale-down-source-surface-paint-ref.png \
581         scale-source-surface-paint-pdf-argb32-ref.png   \
582         scale-source-surface-paint-ref.png      \
583         scale-source-surface-paint-rgb24-ref.png        \
584         scale-source-surface-paint-svg-argb32-ref.png   \
585         scale-source-surface-paint-svg-rgb24-ref.png    \
586         scale-source-surface-paint-pdf-rgb24-ref.png \
587         stroke-ctm-caps-ref.png \
588         stroke-ctm-caps-quartz-ref.png \
589         select-font-face-ref.png        \
590         select-font-face-ps-ref.png \
591         select-font-face-quartz-ref.png \
592         self-copy-ref.png       \
593         self-copy-ps-ref.png    \
594         self-intersecting-ref.png       \
595         self-intersecting-rgb24-ref.png \
596         set-source-ref.png      \
597         set-source-rgb24-ref.png        \
598         set-source-svg-argb32-ref.png   \
599         show-glyphs-many-ref.png        \
600         show-text-current-point-ref.png \
601         show-text-current-point-ps-ref.png \
602         show-text-current-point-quartz-ref.png \
603         skew-extreme-ref.png \
604         skew-extreme-ps-ref.png \
605         smask-ref.png                   \
606         smask-pdf-ref.png               \
607         smask-ps-ref.png                \
608         smask-svg-ref.png               \
609         smask-fill-ref.png              \
610         smask-fill-pdf-ref.png          \
611         smask-fill-svg-ref.png          \
612         smask-image-mask-ref.png        \
613         smask-image-mask-pdf-ref.png    \
614         smask-mask-ref.png              \
615         smask-mask-pdf-ref.png          \
616         smask-mask-svg-ref.png          \
617         smask-paint-ref.png             \
618         smask-paint-pdf-ref.png         \
619         smask-paint-svg-ref.png         \
620         smask-stroke-ref.png            \
621         smask-stroke-pdf-ref.png        \
622         smask-text-ref.png              \
623         smask-text-pdf-ref.png          \
624         smask-text-ps-ref.png           \
625         smask-text-svg-ref.png          \
626         stroke-image-ref.png \
627         stroke-image-pdf-ref.png \
628         stroke-image-ps-ref.png \
629         stroke-image-quartz-ref.png \
630         source-clip-ref.png     \
631         source-clip-scale-quartz-ref.png        \
632         source-clip-scale-ps-argb32-ref.png     \
633         source-clip-scale-ps-rgb24-ref.png      \
634         source-clip-scale-ref.png       \
635         source-clip-scale-svg-ref.png   \
636         source-clip-scale-pdf-ref.png \
637         source-surface-scale-paint-ref.png      \
638         source-surface-scale-paint-rgb24-ref.png        \
639         stroke-ctm-caps-ps-ref.png \
640         surface-pattern-big-scale-down-ref.png  \
641         surface-pattern-pdf-argb32-ref.png      \
642         surface-pattern-ps-argb32-ref.png       \
643         surface-pattern-ref.png \
644         surface-pattern-scale-down-pdf-argb32-ref.png   \
645         surface-pattern-scale-down-ps-argb32-ref.png    \
646         surface-pattern-scale-down-ref.png      \
647         surface-pattern-scale-down-quartz-ref.png       \
648         surface-pattern-scale-up-pdf-argb32-ref.png     \
649         surface-pattern-scale-up-ps-argb32-ref.png      \
650         surface-pattern-scale-up-ref.png        \
651         surface-pattern-svg-ref.png     \
652         svg-surface-source-ref.png \
653         text-antialias-gray-ref.png     \
654         text-antialias-gray-quartz-ref.png      \
655         text-antialias-none-ref.png     \
656         text-antialias-none-quartz-ref.png      \
657         text-antialias-subpixel-ref.png \
658         text-antialias-subpixel-quartz-ref.png  \
659         text-glyph-range-ref.png        \
660         text-glyph-range-rgb24-ref.png  \
661         text-pattern-ps-argb32-ref.png  \
662         text-pattern-ps-rgb24-ref.png   \
663         text-pattern-ref.png    \
664         text-pattern-rgb24-ref.png      \
665         text-pattern-svg-argb32-ref.png \
666         text-pattern-svg-rgb24-ref.png  \
667         text-pattern-pdf-argb32-ref.png \
668         text-pattern-pdf-rgb24-ref.png \
669         text-pattern-quartz-ref.png \
670         text-pattern-quartz-rgb24-ref.png \
671         text-rotate-ref.png     \
672         text-rotate-ps-ref.png  \
673         text-rotate-svg-ref.png \
674         text-rotate-quartz-ref.png \
675         text-transform-ref.png          \
676         text-transform-pdf-ref.png      \
677         text-transform-ps-ref.png       \
678         transforms-ref.png      \
679         transforms-ps-ref.png   \
680         translate-show-surface-ref.png  \
681         trap-clip-quartz-ref.png        \
682         trap-clip-quartz-rgb24-ref.png  \
683         trap-clip-ps-argb32-ref.png     \
684         trap-clip-ps-rgb24-ref.png      \
685         trap-clip-ref.png       \
686         trap-clip-rgb24-ref.png \
687         trap-clip-pdf-argb32-ref.png \
688         trap-clip-pdf-rgb24-ref.png \
689         unantialiased-shapes-ref.png    \
690         unantialiased-shapes-quartz-ref.png \
691         unbounded-operator-ref.png      \
692         unbounded-operator-rgb24-ref.png        \
693         unbounded-operator-quartz-ref.png       \
694         unbounded-operator-quartz-rgb24-ref.png \
695         xlib-expose-event-ref.png \
696         xlib-surface-source-ref.png \
697         zero-alpha-ref.png
699 EXTRA_DIST =            \
700 6x13.pcf                \
701 make-html.pl            \
702 romedalen.png           \
703 surface-source.c        \
704 $(REFERENCE_IMAGES)
706 # Any test for which the code committed to CVS is expected to fail
707 # should be listed here.
709 # This way, we can avoid being bothered by reports of bugs we are
710 # aware of, but users can still report when tests start behaving in
711 # unexpected ways on their system.
713 # Of course, before any "release" of cairo we should eliminate
714 # everything from this list by fixing the bugs. (We don't necessarily
715 # have to be that strict for "snapshots" though.)
716 XFAIL_TESTS =                                   \
717 big-line$(EXEEXT)                               \
718 big-trap$(EXEEXT)                               \
719 extend-pad$(EXEEXT)                             \
720 filter-nearest-offset$(EXEEXT)                  \
721 filter-bilinear-extents$(EXEEXT)                \
722 large-source$(EXEEXT)                           \
723 long-lines$(EXEEXT)                             \
724 self-intersecting$(EXEEXT)                      \
725 surface-pattern$(EXEEXT)                        \
726 surface-pattern-big-scale-down$(EXEEXT)         \
727 surface-pattern-scale-down$(EXEEXT)             \
728 surface-pattern-scale-up$(EXEEXT)
730 # Any test that doesn't generate a log file goes here
731 NOLOG_TESTS =                   \
732 fallback-resolution             \
733 font-options                    \
734 multi-page                      \
735 pdf-features                    \
736 png                             \
737 ps-features                     \
738 svg-clip                        \
739 svg-surface                     \
740 user-data
742 # A hook that summarises the failures
743 # We need to both force make to keep going after failures and to disable the
744 # jobserver (parallel builds).
745 check: AM_MAKEFLAGS+=-k -j1
746 check-local:
747         @FAILED_TESTS=""; \
748         for t in $(TESTS:$(EXEEXT)=.log); do \
749             if grep -e '\<FAIL\>' $$t >/dev/null 2>&1; then \
750                 FAILED_TESTS="$$FAILED_TESTS $${t%.log}"; \
751             fi; \
752         done; \
753         if test -n "$$FAILED_TESTS"; then \
754             echo "Failed tests:"; \
755             surfaces=""; \
756             for t in $$FAILED_TESTS; do \
757                 echo -n "     $$t: "; \
758                 grep -e '\<FAIL\>' $$t.log | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq | tr '\n' ' '; \
759                 echo; \
760                 for s in `grep -e '\<FAIL\>' $$t.log | sed -e 's/.*TARGET: \([^ ]*\).*/\1/' | sort | uniq`; do \
761                     ss=`echo $$s | tr '-' '_'`; \
762                     tt=`echo $$t | tr '-' '_'`; \
763                     eval $$ss=\""$${!ss} $$tt"\"; \
764                     echo $$surfaces | grep $$ss >/dev/null || surfaces="$$surfaces $$ss"; \
765                 done; \
766             done; \
767             echo -n "Failures per surface - "; \
768             first=""; \
769             for s in $$surfaces; do \
770                 ss=`echo $$s | tr '_' '-'`; \
771                 test -n "$$first" && echo -n ", "; \
772                 cnt=`echo $${!s} | wc -w`; \
773                 echo -n "$$ss: $$cnt"; \
774                 first="false"; \
775             done; \
776             echo "."; \
777             for s in $$surfaces; do \
778                 ss=`echo $$s | tr '_' '-'`; \
779                 cnt=`echo $${!s} | wc -w`; \
780                 echo -n "       $$ss [$$cnt]: "; \
781                 echo $${!s} | tr '_' '-'; \
782             done; \
783         fi
785 check_PROGRAMS =
786 EXTRA_PROGRAMS =
788 # We're using _GNU_SOURCE to get the prototype for asprintf. This may
789 # not be the most portable approach, but it is pragmatic and I'm
790 # willing to do something cleaner as soon as it causes someone a
791 # problem.
792 INCLUDES =                                      \
793         -D_GNU_SOURCE                           \
794         -I$(srcdir)                             \
795         -I$(srcdir)/pdiff                       \
796         -I$(top_srcdir)/boilerplate             \
797         -I$(top_srcdir)/pixman/src              \
798         -I$(top_srcdir)/src                     \
799         -I$(top_builddir)/src                   \
800         $(CAIRO_CFLAGS)
802 EXTRA_LTLIBRARIES = libcairotest.la
804 libcairotest_la_SOURCES =\
805         buffer-diff.c   \
806         buffer-diff.h   \
807         cairo-test.c    \
808         cairo-test.h
809 libcairotest_la_LIBADD =\
810         $(top_builddir)/test/pdiff/libpdiff.la \
811         $(top_builddir)/boilerplate/libcairoboilerplate.la \
812         $(top_builddir)/src/libcairo.la \
813         $(CAIRO_LDADD)
815 LDADD = $(CAIRO_LDADD) libcairotest.la
817 $(top_builddir)/boilerplate/libcairoboilerplate.la: $(top_builddir)/src/libcairo.la
818         cd $(top_builddir)/boilerplate && $(MAKE) $(AM_MAKEFLAGS) libcairoboilerplate.la
820 $(top_builddir)/src/libcairo.la:
821         cd $(top_builddir)/src && $(MAKE) $(AM_MAKEFLAGS) libcairo.la
823 $(top_builddir)/test/pdiff/libpdiff.la:
824         cd $(top_builddir)/test/pdiff && $(MAKE) $(AM_MAKEFLAGS) libpdiff.la
826 if HAVE_PTHREAD
827 LDADD += -lpthread
828 endif
830 check_PROGRAMS += imagediff png-flatten
832 if CAIRO_CAN_TEST_PDF_SURFACE
833 check_PROGRAMS += pdf2png
834 pdf2png_CFLAGS = $(POPPLER_CFLAGS)
835 # add LDADD, so poppler uses "our" cairo
836 pdf2png_LDADD  = $(LDADD) $(POPPLER_LIBS)
837 endif
839 if CAIRO_CAN_TEST_SVG_SURFACE
840 check_PROGRAMS += svg2png
841 svg2png_CFLAGS = $(LIBRSVG_CFLAGS)
842 # add LDADD, so librsvg uses "our" cairo
843 svg2png_LDADD  = $(LDADD) $(LIBRSVG_LIBS)
844 endif
846 EXTRA_PROGRAMS += $(TESTS) $(DISABLED_TESTS)
848 # Do a funny transition of CAIRO_TEST_TARGET through TARGETS such that
849 # one can limit tested targets both through CAIRO_TEST_TARGET env var
850 # and TARGETS make var on the command line.  Same for the rest.
851 TARGETS = $(CAIRO_TEST_TARGET)
852 TARGETS_EXCLUDE = $(CAIRO_TEST_TARGET_EXCLUDE)
854 TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS:$(EXEEXT)=)" CAIRO_TEST_TARGET="$(TARGETS)" CAIRO_TEST_TARGET_EXCLUDE="$(TARGETS_EXCLUDE)"
856 EXTRA_VALGRIND_FLAGS = $(CAIRO_EXTRA_VALGRIND_FLAGS)
857 VALGRIND_FLAGS = \
858         --tool=memcheck --suppressions=$(srcdir)/.valgrind-suppressions \
859         --leak-check=yes --show-reachable=yes $(EXTRA_VALGRIND_FLAGS)
861 CLEANFILES =                                    \
862         valgrind-log                            \
863         index.html                              \
864         ref.hash                                \
865         png-test.png                            \
866         $(EXTRA_LTLIBRARIES)                    \
867         $(EXTRA_PROGRAMS)
869 # This used to be a simple 'echo ${RM} *.ps *.pdf *.svg *.etc', but
870 # most systems cannot handle all of our clean files together.
871 # Then it became a fancy find using many GNU extensions, but then the ugly
872 # reality of portability was raised and it became....
873 clean-local:
874         -${FIND} . -name '*.ps'       -print | ${XARGS} ${RM}
875         -${FIND} . -name '*.pdf'      -print | ${XARGS} ${RM}
876         -${FIND} . -name '*.svg'      -print | ${XARGS} ${RM}
877         -${FIND} . -name '*-out.png'  -print | ${XARGS} ${RM}
878         -${FIND} . -name '*-diff.png' -print | ${XARGS} ${RM}
879         -${FIND} . -name '*.log'      -print | ${XARGS} ${RM}
881 # Check tests under valgrind
882 # Saves log to valgrind-log
883 check-valgrind:
884         $(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_builddir)/libtool --mode=execute valgrind $(VALGRIND_FLAGS)' 2>&1 | tee valgrind-log
886 # The following definitions both should work.
887 #FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo`
888 FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:$(EXEEXT)=.log) 2>/dev/null | tr '\n' ' ' | sed -e 's/[.]log  */ /g; s/^ //; s/ $$//'`
890 recheck = check TESTS="$(FAILED_TESTS)"
892 # Re-checks all failed tests, i.e. tests with a log file that has a failure
893 recheck:
894         @echo Re-checking failed tests
895         @$(MAKE) $(AM_MAKEFLAGS) $(recheck)
897 # Checks tests and creates index.html.
898 # Target doesn't fail if tests fail.
899 test:
900         @$(MAKE) $(AM_MAKEFLAGS) check; \
901         $(MAKE) $(AM_MAKEFLAGS) html
903 # Re-checks tests and creates index.html.
904 # Target doesn't fail if tests fail.
905 retest:
906         @TESTS="$(FAILED_TESTS)"; \
907         $(MAKE) $(AM_MAKEFLAGS) TESTS="$$TESTS" check; \
908         $(MAKE) $(AM_MAKEFLAGS) TESTS="$$TESTS" html
910 # Make index.html with no dependency tracking.
911 html:
912         @echo Creating index.html
913         @perl $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log) > index.html
915 # Make index.html with no dependency tracking, containing only the failed tests.
916 rehtml:
917         @$(MAKE) $(AM_MAKEFLAGS) TESTS="$(FAILED_TESTS)" html
919 %.log: % $(check_PROGRAMS)
920         -./$<
922 NOLOG_TESTS_LOG = $(NOLOG_TESTS:=.log)
924 $(NOLOG_TESTS_LOG):
925         echo dummy > $@
927 index.html: $(srcdir)/make-html.pl $(TESTS:$(EXEEXT)=.log)
928         @echo Creating index.html
929         @perl $^ > $@
931 # Identify identical reference images
932 check-ref-dups:
933         @LANG=C; \
934         ( cd "$(scrdir)" && sha1sum *-ref.png | sort ) > ref.hash; \
935         join ref.hash ref.hash | grep -v -E '( .*-ref.png).*\1' | cut -d' ' -f 1-2 | sort -u
937 # Not exactly the best script in the world...
938 check-ref-missing:
939         @cd "$(srcdir)"; \
940         REFS=`git ls-files "*-ref.png"`; \
941         test x = "x$$REFS" && REFS=`ls *-ref.png`; \
942         ret=true; \
943         missing=""; \
944         for i in $$REFS; do \
945             echo "" $(REFERENCE_IMAGES) "" | grep -sq " $$i " || missing="$$missing $$i" ; \
946         done ; \
947         if test -n "$$missing"; then \
948                 echo "*** Error: Sanity check failed"; \
949                 echo "Some reference files are not included in the distribution."; \
950                 echo "You probably need to add these to Makefile.am's REFERENCE_IMAGES."; \
951                 echo "Missing: $$missing"; \
952                 ret=false; \
953         fi >&2; \
954         missing=""; \
955         for i in $(REFERENCE_IMAGES); do \
956             echo "" $$REFS "" | grep -sq " $$i " || missing="$$missing $$i" ; \
957         done ; \
958         if test -n "$$missing"; then \
959                 echo "*** Error: Sanity check failed"; \
960                 echo "Some reference files included in the distribution do not exist"; \
961                 echo "or are not in git.  You probably want to add these to git first."; \
962                 echo "Missing: $$missing"; \
963                 ret=false; \
964         fi >&2; \
965         $$ret
967 release-verify-sane-tests: check-ref-missing
969 .PHONY: check-valgrind test recheck retest html rehtml check-ref-dups check-ref-missing release-verify-sane-tests
971 EXTRA_DIST += Makefile.win32