summaryrefslogtreecommitdiff
path: root/test/Makefile.am
blob: a92f1374567c0384341b2b4c65727104bd7d70a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# All test cases go here
TESTS = 			\
a8-mask				\
caps-sub-paths			\
clip-all			\
clip-nesting			\
clip-operator			\
clip-twice			\
composite-integer-translate-source \
composite-integer-translate-over \
composite-integer-translate-over-repeat \
create-from-png			\
create-from-png-stream		\
dash-offset-negative		\
fill-and-stroke			\
fill-rule			\
filter-nearest-offset		\
get-and-set			\
gradient-alpha			\
leaky-polygon			\
line-width			\
linear-gradient			\
mask				\
mask-ctm			\
mask-surface-ctm		\
move-to-show-surface		\
nil-surface			\
operator-clear			\
operator-source			\
paint				\
paint-with-alpha		\
path-data			\
pixman-rotate			\
rectangle-rounding-error	\
scale-source-surface-paint	\
select-font-no-show-text	\
self-copy			\
self-intersecting		\
set-source			\
show-text-current-point		\
source-clip			\
source-surface-scale-paint	\
surface-finish-twice		\
surface-pattern			\
text-antialias-gray		\
text-antialias-none		\
text-antialias-subpixel		\
text-cache-crash		\
text-pattern			\
text-rotate			\
transforms			\
translate-show-surface		\
trap-clip			\
unantialiased-shapes		\
unbounded-operator		\
user-data			\
rel-path

if HAVE_PTHREAD
TESTS += pthread-show-text
endif

if CAIRO_HAS_FT_FONT
TESTS += ft-font-create-for-ft-face
endif

if CAIRO_HAS_PDF_SURFACE
TESTS += pdf-surface pdf-clip
endif

if CAIRO_HAS_PS_SURFACE
TESTS += ps-surface
endif

if CAIRO_HAS_XLIB_SURFACE
TESTS += xlib-surface
endif

# All tests which have a reference image go here.
# I really don't like having to repeat this list. Anyone know a good
# way to avoid it? Can I use a wildcard here?
EXTRA_DIST =				\
a8-mask-ref.png				\
caps-sub-paths-ref.png			\
clip-all-ref.png			\
clip-nesting-ref.png			\
clip-operator-ref.png			\
clip-twice-ref.png			\
composite-integer-translate-source-ref.png		\
composite-integer-translate-over-ref.png		\
composite-integer-translate-over-repeat-ref.png		\
create-from-png-ref.png			\
create-from-png-stream-ref.png		\
dash-offset-negative-ref.png		\
fill-and-stroke-ref.png			\
fill-rule-ref.png			\
filter-nearest-offset-ref.png		\
gradient-alpha-ref.png			\
leaky-polygon-ref.png			\
line-width-ref.png			\
linear-gradient-ref.png			\
mask-ref.png				\
mask-ctm-ref.png			\
mask-surface-ctm-ref.png		\
move-to-show-surface-ref.png		\
nil-surface-ref.png			\
operator-clear-ref.png			\
operator-source-ref.png			\
paint-ref.png				\
paint-with-alpha-ref.png		\
path-data-ref.png			\
pixman-rotate-ref.png			\
rectangle-rounding-error-ref.png	\
romedalen.png				\
self-copy-ref.png			\
self-intersecting-ref.png		\
scale-source-surface-paint-ref.png	\
set-source-ref.png			\
show-text-current-point-ref.png		\
source-clip-ref.png			\
source-surface-scale-paint-ref.png	\
surface-pattern-ref.png			\
text-antialias-gray-ref.png		\
text-antialias-none-ref.png		\
text-antialias-subpixel-ref.png		\
text-pattern-ref.png			\
transforms-ref.png			\
translate-show-surface-ref.png		\
trap-clip-ref.png			\
unantialiased-shapes-ref.png		\
unbounded-operator-ref.png		\
rel-path-ref.png

# Any test for which the code committed to CVS is expected to fail
# should be listed here.
#
# This way, we can avoid being bothered by reports of bugs we are
# aware of, but users can still report when tests start behaving in
# unexpected ways on their system.
#
# Of course, before any "release" of cairo we should eliminate
# everything from this list by fixing the bugs. (We don't necessarily
# have to be that strict for "snapshots" though.)
#
# Also, any test listed here should call cairo_test_expect_failure and
# provide an explanation for the expected failure.
XFAIL_TESTS =			\
a8-mask				\
clip-all			\
filter-nearest-offset		\
pixman-rotate			\
self-intersecting		\
text-rotate

check_PROGRAMS = $(TESTS)

# We're using _GNU_SOURCE to get the prototype for asprintf. This may
# not be the most portable approach, but it is pragmatic and I'm
# willing to do something cleaner as soon as it causes someone a
# problem.
INCLUDES =					\
	-D_GNU_SOURCE				\
	-I$(srcdir)				\
	-I$(top_srcdir)/pixman/src		\
	-I$(top_builddir)/src			\
	-I$(top_srcdir)/src			\
	$(CAIRO_CFLAGS)

noinst_LTLIBRARIES = libcairotest.la

libcairotest_la_SOURCES =\
buffer-diff.c	\
buffer-diff.h	\
cairo-test.c	\
cairo-test.h	\
read-png.c	\
read-png.h	\
write-png.c	\
write-png.h	\
xmalloc.c	\
xmalloc.h

LDADDS = libcairotest.la $(top_builddir)/src/libcairo.la

if HAVE_PTHREAD
LDADDS += -lpthread
endif

# ARGH! I have to repeat the list of tests a third time. Maybe it's
# time to break down and auto-generate the Makefile.am or something
# from autogen.sh. My, but this is painful...
a8_mask_LDADD = $(LDADDS)
caps_sub_paths_LDADD = $(LDADDS)
clip_all_LDADD = $(LDADDS)
clip_nesting_LDADD = $(LDADDS)
clip_operator_LDADD = $(LDADDS)
clip_twice_LDADD = $(LDADDS)
composite_integer_translate_source_LDADD = $(LDADDS)
composite_integer_translate_over_LDADD = $(LDADDS)
composite_integer_translate_over_repeat_LDADD = $(LDADDS)
create_from_png_LDADD = $(LDADDS)
create_from_png_stream_LDADD = $(LDADDS)
dash_offset_negative_LDADD = $(LDADDS)
fill_and_stroke_LDADD = $(LDADDS)
fill_rule_LDADD = $(LDADDS)
filter_nearest_offset_LDADD = $(LDADDS)
ft_font_create_for_ft_face_LDADD = $(LDADDS)
get_and_set_LDADD = $(LDADDS)
gradient_alpha_LDADD = $(LDADDS)
leaky_polygon_LDADD = $(LDADDS)
line_width_LDADD = $(LDADDS)
linear_gradient_LDADD = $(LDADDS)
mask_LDADD = $(LDADDS)
mask_ctm_LDADD = $(LDADDS)
mask_surface_ctm_LDADD = $(LDADDS)
move_to_show_surface_LDADD = $(LDADDS)
nil_surface_LDADD = $(LDADDS)
operator_clear_LDADD = $(LDADDS)
operator_source_LDADD = $(LDADDS)
paint_LDADD = $(LDADDS)
paint_with_alpha_LDADD = $(LDADDS)
path_data_LDADD = $(LDADDS)
pdf_surface_LDADD = $(LDADDS)
pdf_clip_LDADD = $(LDADDS)
pixman_rotate_LDADD = $(LDADDS)
ps_surface_LDADD = $(LDADDS)
pthread_show_text_LDADD = $(LDADDS)
rectangle_rounding_error_LDADD = $(LDADDS)
scale_source_surface_paint_LDADD = $(LDADDS)
select_font_no_show_text_LDADD = $(LDADDS)
self_copy_LDADD = $(LDADDS)
self_intersecting_LDADD = $(LDADDS)
set_source_LDADD = $(LDADDS)
show_text_current_point_LDADD = $(LDADDS)
source_clip_LDADD = $(LDADDS)
source_surface_scale_paint_LDADD = $(LDADDS)
surface_finish_twice_LDADD = $(LDADDS)
surface_pattern_LDADD = $(LDADDS)
text_antialias_gray_LDADD = $(LDADDS)
text_antialias_none_LDADD = $(LDADDS)
text_antialias_subpixel_LDADD = $(LDADDS)
text_cache_crash_LDADD = $(LDADDS)
text_pattern_LDADD = $(LDADDS)
text_rotate_LDADD = $(LDADDS)
transforms_LDADD = $(LDADDS)
translate_show_surface_LDADD = $(LDADDS)
trap_clip_LDADD = $(LDADDS)
unantialiased_shapes_LDADD = $(LDADDS)
unbounded_operator_LDADD = $(LDADDS)
user_data_LDADD = $(LDADDS)
rel_path_LDADD = $(LDADDS)
xlib_surface_LDADD = $(LDADDS)

noinst_PROGRAMS = imagediff
imagediff_LDADD = $(LDADDS)

CLEANFILES =					\
	*-out.png				\
	*-diff.png				\
	*.log					\
	ps-surface.ps				\
	pdf-surface.pdf				\
	pdf-clip.pdf

check-valgrind:
	TESTS_ENVIRONMENT="libtool --mode=execute valgrind --tool=memcheck --suppressions=./.valgrind-suppressions --leak-check=yes --show-reachable=yes" $(MAKE) check 2>&1 | tee valgrind.log