]> git.saurik.com Git - wxWidgets.git/blob - src/tiff/test/Makefile.am
Crash fix for inserting text into a buffer without an associated control
[wxWidgets.git] / src / tiff / test / Makefile.am
1 # Tag Image File Format (TIFF) Software
2 #
3 # Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
4 #
5 # Permission to use, copy, modify, distribute, and sell this software and
6 # its documentation for any purpose is hereby granted without fee, provided
7 # that (i) the above copyright notices and this permission notice appear in
8 # all copies of the software and related documentation, and (ii) the names of
9 # Sam Leffler and Silicon Graphics may not be used in any advertising or
10 # publicity relating to the software without the specific, prior written
11 # permission of Sam Leffler and Silicon Graphics.
12 #
13 # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
14 # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
15 # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
16 #
17 # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
18 # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
19 # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
20 # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
21 # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22 # OF THIS SOFTWARE.
23
24 # Process this file with automake to produce Makefile.in.
25
26 AUTOMAKE_OPTIONS = 1.12 color-tests parallel-tests foreign
27
28 LIBTIFF = $(top_builddir)/libtiff/libtiff.la
29
30 # Environment parameters to be used during tests
31 TESTS_ENVIRONMENT = \
32 MAKE="$(MAKE)" \
33 MAKEFLAGS="$(MAKEFLAGS)" \
34 MEMCHECK="$(MEMCHECK)"
35
36 EXTRA_DIST = \
37 $(TESTSCRIPTS) \
38 $(IMAGES_EXTRA_DIST) \
39 common.sh
40
41 # All of the tests to execute via 'make check'
42 TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
43
44 # Tests which are expected to fail
45 XFAIL_TESTS =
46
47 # Extra files which should be cleaned by 'make clean'
48 CLEANFILES = test_packbits.tif o-*
49
50 # Executable programs which need to be built in order to support tests
51 check_PROGRAMS = ascii_tag long_tag short_tag strip_rw rewrite raw_decode custom_dir
52
53 # Test scripts to execute
54 TESTSCRIPTS = \
55 bmp2tiff_palette.sh \
56 bmp2tiff_rgb.sh \
57 gif2tiff.sh \
58 ppm2tiff_pbm.sh \
59 ppm2tiff_pgm.sh \
60 ppm2tiff_ppm.sh \
61 tiffcp-g3.sh \
62 tiffcp-g3-1d.sh \
63 tiffcp-g3-1d-fill.sh \
64 tiffcp-g3-2d.sh \
65 tiffcp-g3-2d-fill.sh \
66 tiffcp-g4.sh \
67 tiffcp-logluv.sh \
68 tiffcp-thumbnail.sh \
69 tiffdump.sh \
70 tiffinfo.sh \
71 tiffcp-split.sh \
72 tiffcp-split-join.sh \
73 tiff2ps-PS1.sh \
74 tiff2ps-PS2.sh \
75 tiff2ps-PS3.sh \
76 tiff2ps-EPS1.sh \
77 tiff2pdf.sh \
78 tiffcrop-doubleflip-logluv-3c-16b.sh \
79 tiffcrop-doubleflip-minisblack-1c-16b.sh \
80 tiffcrop-doubleflip-minisblack-1c-8b.sh \
81 tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
82 tiffcrop-doubleflip-miniswhite-1c-1b.sh \
83 tiffcrop-doubleflip-palette-1c-1b.sh \
84 tiffcrop-doubleflip-palette-1c-4b.sh \
85 tiffcrop-doubleflip-palette-1c-8b.sh \
86 tiffcrop-doubleflip-rgb-3c-16b.sh \
87 tiffcrop-doubleflip-rgb-3c-8b.sh \
88 tiffcrop-extract-logluv-3c-16b.sh \
89 tiffcrop-extract-minisblack-1c-16b.sh \
90 tiffcrop-extract-minisblack-1c-8b.sh \
91 tiffcrop-extract-minisblack-2c-8b-alpha.sh \
92 tiffcrop-extract-miniswhite-1c-1b.sh \
93 tiffcrop-extract-palette-1c-1b.sh \
94 tiffcrop-extract-palette-1c-4b.sh \
95 tiffcrop-extract-palette-1c-8b.sh \
96 tiffcrop-extract-rgb-3c-16b.sh \
97 tiffcrop-extract-rgb-3c-8b.sh \
98 tiffcrop-extractz14-logluv-3c-16b.sh \
99 tiffcrop-extractz14-minisblack-1c-16b.sh \
100 tiffcrop-extractz14-minisblack-1c-8b.sh \
101 tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
102 tiffcrop-extractz14-miniswhite-1c-1b.sh \
103 tiffcrop-extractz14-palette-1c-1b.sh \
104 tiffcrop-extractz14-palette-1c-4b.sh \
105 tiffcrop-extractz14-palette-1c-8b.sh \
106 tiffcrop-extractz14-rgb-3c-16b.sh \
107 tiffcrop-extractz14-rgb-3c-8b.sh \
108 tiffcrop-R90-logluv-3c-16b.sh \
109 tiffcrop-R90-minisblack-1c-16b.sh \
110 tiffcrop-R90-minisblack-1c-8b.sh \
111 tiffcrop-R90-minisblack-2c-8b-alpha.sh \
112 tiffcrop-R90-miniswhite-1c-1b.sh \
113 tiffcrop-R90-palette-1c-1b.sh \
114 tiffcrop-R90-palette-1c-4b.sh \
115 tiffcrop-R90-palette-1c-8b.sh \
116 tiffcrop-R90-rgb-3c-16b.sh \
117 tiffcrop-R90-rgb-3c-8b.sh \
118 tiff2rgba-logluv-3c-16b.sh \
119 tiff2rgba-minisblack-1c-16b.sh \
120 tiff2rgba-minisblack-1c-8b.sh \
121 tiff2rgba-minisblack-2c-8b-alpha.sh \
122 tiff2rgba-miniswhite-1c-1b.sh \
123 tiff2rgba-palette-1c-1b.sh \
124 tiff2rgba-palette-1c-4b.sh \
125 tiff2rgba-palette-1c-8b.sh \
126 tiff2rgba-rgb-3c-16b.sh \
127 tiff2rgba-rgb-3c-8b.sh \
128 tiff2rgba-quad-tile.jpg.sh
129
130 # This list should contain all of the TIFF files in the 'images'
131 # subdirectory which are intended to be used as input images for
132 # tests. All of these files should use the extension ".tiff".
133 TIFFIMAGES = \
134 images/logluv-3c-16b.tiff \
135 images/minisblack-1c-16b.tiff \
136 images/minisblack-1c-8b.tiff \
137 images/minisblack-2c-8b-alpha.tiff \
138 images/miniswhite-1c-1b.tiff \
139 images/palette-1c-1b.tiff \
140 images/palette-1c-4b.tiff \
141 images/palette-1c-8b.tiff \
142 images/rgb-3c-16b.tiff \
143 images/rgb-3c-8b.tiff \
144 images/quad-tile.jpg.tiff
145
146 BMPIMAGES = \
147 images/palette-1c-8b.bmp \
148 images/rgb-3c-8b.bmp
149
150 GIFIMAGES = \
151 images/palette-1c-8b.gif
152
153 PNMIMAGES = \
154 images/minisblack-1c-8b.pgm \
155 images/miniswhite-1c-1b.pbm \
156 images/rgb-3c-8b.ppm
157
158 # This list should include all of the files in the 'images'
159 # subdirectory which are intended to be distributed. This may include
160 # files which are not currently used by the tests.
161 IMAGES_EXTRA_DIST = \
162 images/README.txt \
163 $(BMPIMAGES) \
164 $(GIFIMAGES) \
165 $(PNMIMAGES) \
166 $(TIFFIMAGES)
167
168 noinst_HEADERS = tifftest.h
169
170 ascii_tag_SOURCES = ascii_tag.c
171 ascii_tag_LDADD = $(LIBTIFF)
172 long_tag_SOURCES = long_tag.c check_tag.c
173 long_tag_LDADD = $(LIBTIFF)
174 short_tag_SOURCES = short_tag.c check_tag.c
175 short_tag_LDADD = $(LIBTIFF)
176 strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h
177 strip_rw_LDADD = $(LIBTIFF)
178 rewrite_SOURCES = rewrite_tag.c
179 rewrite_LDADD = $(LIBTIFF)
180 raw_decode_SOURCES = raw_decode.c
181 raw_decode_LDADD = $(LIBTIFF)
182 custom_dir_SOURCES = custom_dir.c
183 custom_dir_LDADD = $(LIBTIFF)
184
185 AM_CPPFLAGS = -I$(top_srcdir)/libtiff
186
187 # memcheck: valgrind's memory access checker
188 memcheck:
189 $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes --track-origins=yes --num-callers=12 --quiet $(VALGRIND_EXTRA_OPTS)' check
190
191 # ptrcheck: valgrind's experimental pointer checking tool.
192 ptrcheck:
193 $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check
194
195 generate-tiff2rgba-tests:
196 for file in $(TIFFIMAGES) ; \
197 do \
198 base=`basename $$file .tiff` ; \
199 testscript=$(srcdir)/tiff2rgba-$$base.sh ; \
200 ( \
201 echo "#!/bin/sh" ; \
202 echo "# Generated file, master is Makefile.am" ; \
203 echo ". \$${srcdir:-.}/common.sh" ; \
204 echo "infile=\"\$$srcdir/$$file\"" ; \
205 echo "outfile=\"o-tiff2rgba-$$base.tiff\"" ; \
206 echo "f_test_convert \"\$$TIFF2RGBA\" \$$infile \$$outfile" ; \
207 echo "f_tiffinfo_validate \$$outfile" ; \
208 ) > $$testscript ; \
209 chmod +x $$testscript ; \
210 done
211
212 # Test rotations
213 generate-tiffcrop-R90-tests:
214 for file in $(TIFFIMAGES) ; \
215 do \
216 base=`basename $$file .tiff` ; \
217 testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \
218 ( \
219 echo "#!/bin/sh" ; \
220 echo "# Generated file, master is Makefile.am" ; \
221 echo ". \$${srcdir:-.}/common.sh" ; \
222 echo "infile=\"\$$srcdir/$$file\"" ; \
223 echo "outfile=\"o-tiffcrop-R90-$$base.tiff\"" ; \
224 echo "f_test_convert \"\$$TIFFCROP -R90\" \$$infile \$$outfile" ; \
225 echo "f_tiffinfo_validate \$$outfile" ; \
226 ) > $$testscript ; \
227 chmod +x $$testscript ; \
228 done
229
230 # Test flip (mirror)
231 generate-tiffcrop-doubleflip-tests:
232 for file in $(TIFFIMAGES) ; \
233 do \
234 base=`basename $$file .tiff` ; \
235 testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \
236 ( \
237 echo "#!/bin/sh" ; \
238 echo "# Generated file, master is Makefile.am" ; \
239 echo ". \$${srcdir:-.}/common.sh" ; \
240 echo "infile=\"\$$srcdir/$$file\"" ; \
241 echo "outfile=\"o-tiffcrop-doubleflip-$$base.tiff\"" ; \
242 echo "f_test_convert \"\$$TIFFCROP -F both\" \$$infile \$$outfile" ; \
243 echo "f_tiffinfo_validate \$$outfile" ; \
244 ) > $$testscript ; \
245 chmod +x $$testscript ; \
246 done
247
248 # Test extracting a section 100 pixels wide and 100 pixels high
249 generate-tiffcrop-extract-tests:
250 for file in $(TIFFIMAGES) ; \
251 do \
252 base=`basename $$file .tiff` ; \
253 testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \
254 ( \
255 echo "#!/bin/sh" ; \
256 echo "# Generated file, master is Makefile.am" ; \
257 echo ". \$${srcdir:-.}/common.sh" ; \
258 echo "infile=\"\$$srcdir/$$file\"" ; \
259 echo "outfile=\"o-tiffcrop-extract-$$base.tiff\"" ; \
260 echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 60 -Y 60\" \$$infile \$$outfile" ; \
261 echo "f_tiffinfo_validate \$$outfile" ; \
262 ) > $$testscript ; \
263 chmod +x $$testscript ; \
264 done
265
266 # Test extracting the first and fourth quarters from the left side.
267 generate-tiffcrop-extractz14-tests:
268 for file in $(TIFFIMAGES) ; \
269 do \
270 base=`basename $$file .tiff` ; \
271 testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \
272 ( \
273 echo "#!/bin/sh" ; \
274 echo "# Generated file, master is Makefile.am" ; \
275 echo ". \$${srcdir:-.}/common.sh" ; \
276 echo "infile=\"\$$srcdir/$$file\"" ; \
277 echo "outfile=\"o-tiffcrop-extractz14-$$base.tiff\"" ; \
278 echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \$$infile \$$outfile" ; \
279 echo "f_tiffinfo_validate \$$outfile" ; \
280 ) > $$testscript ; \
281 chmod +x $$testscript ; \
282 done
283
284 generate-tiffcrop-tests: \
285 generate-tiffcrop-R90-tests \
286 generate-tiffcrop-doubleflip-tests \
287 generate-tiffcrop-extract-tests \
288 generate-tiffcrop-extractz14-tests
289
290 generate-tests: \
291 generate-tiff2rgba-tests \
292 generate-tiffcrop-tests