1 # Tag Image File Format (TIFF) Software
3 # Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
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.
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.
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
24 # Process this file with automake to produce Makefile.in.
26 AUTOMAKE_OPTIONS = 1.12 color-tests parallel-tests foreign
28 LIBTIFF = $(top_builddir)/libtiff/libtiff.la
30 # Environment parameters to be used during tests
33 MAKEFLAGS="$(MAKEFLAGS)" \
34 MEMCHECK="$(MEMCHECK)"
38 $(IMAGES_EXTRA_DIST) \
41 # All of the tests to execute via 'make check'
42 TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
44 # Tests which are expected to fail
47 # Extra files which should be cleaned by 'make clean'
48 CLEANFILES = test_packbits.tif o-*
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
53 # Test scripts to execute
63 tiffcp-g3-1d-fill.sh \
65 tiffcp-g3-2d-fill.sh \
72 tiffcp-split-join.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
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".
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
147 images/palette-1c-8b.bmp \
151 images/palette-1c-8b.gif
154 images/minisblack-1c-8b.pgm \
155 images/miniswhite-1c-1b.pbm \
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 = \
168 noinst_HEADERS = tifftest.h
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)
185 AM_CPPFLAGS = -I$(top_srcdir)/libtiff
187 # memcheck: valgrind's memory access checker
189 $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes --track-origins=yes --num-callers=12 --quiet $(VALGRIND_EXTRA_OPTS)' check
191 # ptrcheck: valgrind's experimental pointer checking tool.
193 $(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check
195 generate-tiff2rgba-tests:
196 for file in $(TIFFIMAGES) ; \
198 base=`basename $$file .tiff` ; \
199 testscript=$(srcdir)/tiff2rgba-$$base.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" ; \
209 chmod +x $$testscript ; \
213 generate-tiffcrop-R90-tests:
214 for file in $(TIFFIMAGES) ; \
216 base=`basename $$file .tiff` ; \
217 testscript=$(srcdir)/tiffcrop-R90-$$base.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" ; \
227 chmod +x $$testscript ; \
231 generate-tiffcrop-doubleflip-tests:
232 for file in $(TIFFIMAGES) ; \
234 base=`basename $$file .tiff` ; \
235 testscript=$(srcdir)/tiffcrop-doubleflip-$$base.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" ; \
245 chmod +x $$testscript ; \
248 # Test extracting a section 100 pixels wide and 100 pixels high
249 generate-tiffcrop-extract-tests:
250 for file in $(TIFFIMAGES) ; \
252 base=`basename $$file .tiff` ; \
253 testscript=$(srcdir)/tiffcrop-extract-$$base.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" ; \
263 chmod +x $$testscript ; \
266 # Test extracting the first and fourth quarters from the left side.
267 generate-tiffcrop-extractz14-tests:
268 for file in $(TIFFIMAGES) ; \
270 base=`basename $$file .tiff` ; \
271 testscript=$(srcdir)/tiffcrop-extractz14-$$base.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" ; \
281 chmod +x $$testscript ; \
284 generate-tiffcrop-tests: \
285 generate-tiffcrop-R90-tests \
286 generate-tiffcrop-doubleflip-tests \
287 generate-tiffcrop-extract-tests \
288 generate-tiffcrop-extractz14-tests
291 generate-tiff2rgba-tests \
292 generate-tiffcrop-tests