| 1 |
# Tag Image File Format (TIFF) Software |
| 2 |
# |
| 3 |
# Copyright (C) 2004, Andrey Kiselev <[email protected]> |
| 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.11 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 |
$(REFFILES) \ |
| 38 |
$(TESTSCRIPTS) \ |
| 39 |
$(IMAGES_EXTRA_DIST) \ |
| 40 |
CMakeLists.txt \ |
| 41 |
common.sh \ |
| 42 |
TiffSplitTest.cmake \ |
| 43 |
TiffTestCommon.cmake \ |
| 44 |
TiffTest.cmake |
| 45 |
|
| 46 |
# All of the tests to execute via 'make check' |
| 47 |
if TIFF_TESTS |
| 48 |
TESTS = $(check_PROGRAMS) $(TESTSCRIPTS_TO_RUN) |
| 49 |
endif |
| 50 |
|
| 51 |
# Tests which are expected to fail |
| 52 |
XFAIL_TESTS = |
| 53 |
|
| 54 |
# Extra files which should be cleaned by 'make clean' |
| 55 |
CLEANFILES = test_packbits.tif o-* |
| 56 |
|
| 57 |
JPEG_DEPENDENT_TESTSCRIPTS=\ |
| 58 |
tiff2rgba-quad-tile.jpg.sh \ |
| 59 |
tiff2rgba-ojpeg_zackthecat_subsamp22_single_strip.sh \ |
| 60 |
tiff2rgba-ojpeg_chewey_subsamp21_multi_strip.sh \ |
| 61 |
tiff2rgba-ojpeg_single_strip_no_rowsperstrip.sh \ |
| 62 |
tiff2rgba-32bpp-None-jpeg.sh \ |
| 63 |
tiffcp-32bpp-None-jpeg.sh \ |
| 64 |
tiffcrop-32bpp-None-jpeg.sh |
| 65 |
|
| 66 |
if HAVE_JPEG |
| 67 |
if TIFF_TOOLS |
| 68 |
JPEG_DEPENDENT_CHECK_PROG=raw_decode |
| 69 |
JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN=$(JPEG_DEPENDENT_TESTSCRIPTS) |
| 70 |
endif |
| 71 |
else |
| 72 |
JPEG_DEPENDENT_CHECK_PROG= |
| 73 |
JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN= |
| 74 |
endif |
| 75 |
|
| 76 |
JBIG_DEPENDENT_TESTSCRIPTS=\ |
| 77 |
tiffcp-lzw-single-strip-jbig.sh |
| 78 |
|
| 79 |
if HAVE_JBIG |
| 80 |
if TIFF_TOOLS |
| 81 |
JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN=$(JBIG_DEPENDENT_TESTSCRIPTS) |
| 82 |
endif |
| 83 |
else |
| 84 |
JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN= |
| 85 |
endif |
| 86 |
|
| 87 |
if BUILD_STATIC |
| 88 |
STATIC_CHECK_PROGS=rational_precision2double test_write_read_tags test_transferfunction_write_read |
| 89 |
endif |
| 90 |
|
| 91 |
# Executable programs which need to be built in order to support tests |
| 92 |
if TIFF_TESTS |
| 93 |
check_PROGRAMS = \ |
| 94 |
ascii_tag long_tag short_tag strip_rw rewrite custom_dir custom_dir_EXIF_231 \ |
| 95 |
defer_strile_loading defer_strile_writing test_directory test_IFD_enlargement test_open_options \ |
| 96 |
test_append_to_strip test_ifd_loop_detection testtypes test_signed_tags $(JPEG_DEPENDENT_CHECK_PROG) $(STATIC_CHECK_PROGS) |
| 97 |
endif |
| 98 |
|
| 99 |
# Test scripts to execute |
| 100 |
BASE_TESTSCRIPTS = \ |
| 101 |
ppm2tiff_pbm.sh \ |
| 102 |
ppm2tiff_pgm.sh \ |
| 103 |
ppm2tiff_ppm.sh \ |
| 104 |
fax2tiff.sh \ |
| 105 |
tiffcp-g3.sh \ |
| 106 |
tiffcp-g3-1d.sh \ |
| 107 |
tiffcp-g3-1d-fill.sh \ |
| 108 |
tiffcp-g3-2d.sh \ |
| 109 |
tiffcp-g3-2d-fill.sh \ |
| 110 |
tiffcp-g4.sh \ |
| 111 |
tiffcp-logluv.sh \ |
| 112 |
tiffcp-thumbnail.sh \ |
| 113 |
tiffcp-lzw-compat.sh \ |
| 114 |
tiffcp-lzw-scanline-decode.sh \ |
| 115 |
tiffdump.sh \ |
| 116 |
tiffinfo.sh \ |
| 117 |
tiffcp-split.sh \ |
| 118 |
tiffcp-split-join.sh \ |
| 119 |
tiff2ps-PS1.sh \ |
| 120 |
tiff2ps-PS2.sh \ |
| 121 |
tiff2ps-PS3.sh \ |
| 122 |
tiff2ps-EPS1.sh \ |
| 123 |
tiff2pdf.sh \ |
| 124 |
tiffcrop-doubleflip-logluv-3c-16b.sh \ |
| 125 |
tiffcrop-doubleflip-minisblack-1c-16b.sh \ |
| 126 |
tiffcrop-doubleflip-minisblack-1c-8b.sh \ |
| 127 |
tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \ |
| 128 |
tiffcrop-doubleflip-miniswhite-1c-1b.sh \ |
| 129 |
tiffcrop-doubleflip-palette-1c-1b.sh \ |
| 130 |
tiffcrop-doubleflip-palette-1c-4b.sh \ |
| 131 |
tiffcrop-doubleflip-palette-1c-8b.sh \ |
| 132 |
tiffcrop-doubleflip-rgb-3c-16b.sh \ |
| 133 |
tiffcrop-doubleflip-rgb-3c-8b.sh \ |
| 134 |
tiffcrop-extract-logluv-3c-16b.sh \ |
| 135 |
tiffcrop-extract-minisblack-1c-16b.sh \ |
| 136 |
tiffcrop-extract-minisblack-1c-8b.sh \ |
| 137 |
tiffcrop-extract-minisblack-2c-8b-alpha.sh \ |
| 138 |
tiffcrop-extract-miniswhite-1c-1b.sh \ |
| 139 |
tiffcrop-extract-palette-1c-1b.sh \ |
| 140 |
tiffcrop-extract-palette-1c-4b.sh \ |
| 141 |
tiffcrop-extract-palette-1c-8b.sh \ |
| 142 |
tiffcrop-extract-rgb-3c-16b.sh \ |
| 143 |
tiffcrop-extract-rgb-3c-8b.sh \ |
| 144 |
tiffcrop-extractz14-logluv-3c-16b.sh \ |
| 145 |
tiffcrop-extractz14-minisblack-1c-16b.sh \ |
| 146 |
tiffcrop-extractz14-minisblack-1c-8b.sh \ |
| 147 |
tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \ |
| 148 |
tiffcrop-extractz14-miniswhite-1c-1b.sh \ |
| 149 |
tiffcrop-extractz14-palette-1c-1b.sh \ |
| 150 |
tiffcrop-extractz14-palette-1c-4b.sh \ |
| 151 |
tiffcrop-extractz14-palette-1c-8b.sh \ |
| 152 |
tiffcrop-extractz14-rgb-3c-16b.sh \ |
| 153 |
tiffcrop-extractz14-rgb-3c-8b.sh \ |
| 154 |
tiffcrop-R90-logluv-3c-16b.sh \ |
| 155 |
tiffcrop-R90-minisblack-1c-16b.sh \ |
| 156 |
tiffcrop-R90-minisblack-1c-8b.sh \ |
| 157 |
tiffcrop-R90-minisblack-2c-8b-alpha.sh \ |
| 158 |
tiffcrop-R90-miniswhite-1c-1b.sh \ |
| 159 |
tiffcrop-R90-palette-1c-1b.sh \ |
| 160 |
tiffcrop-R90-palette-1c-4b.sh \ |
| 161 |
tiffcrop-R90-palette-1c-8b.sh \ |
| 162 |
tiffcrop-R90-rgb-3c-16b.sh \ |
| 163 |
tiffcrop-R90-rgb-3c-8b.sh \ |
| 164 |
tiff2bw-palette-1c-8b.sh \ |
| 165 |
tiff2bw-quad-lzw-compat.sh \ |
| 166 |
tiff2bw-rgb-3c-8b.sh \ |
| 167 |
tiff2rgba-logluv-3c-16b.sh \ |
| 168 |
tiff2rgba-minisblack-1c-16b.sh \ |
| 169 |
tiff2rgba-minisblack-1c-8b.sh \ |
| 170 |
tiff2rgba-minisblack-2c-8b-alpha.sh \ |
| 171 |
tiff2rgba-miniswhite-1c-1b.sh \ |
| 172 |
tiff2rgba-palette-1c-1b.sh \ |
| 173 |
tiff2rgba-palette-1c-4b.sh \ |
| 174 |
tiff2rgba-palette-1c-8b.sh \ |
| 175 |
tiff2rgba-rgb-3c-16b.sh \ |
| 176 |
tiff2rgba-rgb-3c-8b.sh \ |
| 177 |
testfax4.sh \ |
| 178 |
testfax3_bug_513.sh \ |
| 179 |
testdeflatelaststripextradata.sh |
| 180 |
|
| 181 |
TESTSCRIPTS =$(BASE_TESTSCRIPTS) \ |
| 182 |
$(JPEG_DEPENDENT_TESTSCRIPTS) \ |
| 183 |
$(JBIG_DEPENDENT_TESTSCRIPTS) |
| 184 |
|
| 185 |
if TIFF_TOOLS |
| 186 |
TESTSCRIPTS_TO_RUN=$(BASE_TESTSCRIPTS) \ |
| 187 |
$(JPEG_DEPENDENT_TESTSCRIPTS_TO_RUN) \ |
| 188 |
$(JBIG_DEPENDENT_TESTSCRIPTS_TO_RUN) |
| 189 |
else |
| 190 |
TESTSCRIPTS_TO_RUN= |
| 191 |
endif |
| 192 |
|
| 193 |
# This list should contain the references files |
| 194 |
# from the 'refs' subdirectory |
| 195 |
REFFILES = \ |
| 196 |
refs/o-tiff2ps-EPS1.ps \ |
| 197 |
refs/o-tiff2ps-PS1.ps \ |
| 198 |
refs/o-tiff2ps-PS2.ps \ |
| 199 |
refs/o-tiff2ps-PS3.ps \ |
| 200 |
refs/o-testfax4.tiff \ |
| 201 |
refs/o-testfax3_bug_513.tiff \ |
| 202 |
refs/o-deflate-last-strip-extra-data.tiff |
| 203 |
|
| 204 |
# This list should contain all of the TIFF files in the 'images' |
| 205 |
# subdirectory which are intended to be used as input images for |
| 206 |
# tests. All of these files should use the extension ".tiff". |
| 207 |
TIFFIMAGES = \ |
| 208 |
images/logluv-3c-16b.tiff \ |
| 209 |
images/minisblack-1c-16b.tiff \ |
| 210 |
images/minisblack-1c-8b.tiff \ |
| 211 |
images/minisblack-2c-8b-alpha.tiff \ |
| 212 |
images/miniswhite-1c-1b.tiff \ |
| 213 |
images/palette-1c-1b.tiff \ |
| 214 |
images/palette-1c-4b.tiff \ |
| 215 |
images/palette-1c-8b.tiff \ |
| 216 |
images/rgb-3c-16b.tiff \ |
| 217 |
images/rgb-3c-8b.tiff \ |
| 218 |
images/quad-tile.jpg.tiff \ |
| 219 |
images/quad-lzw-compat.tiff \ |
| 220 |
images/lzw-single-strip.tiff \ |
| 221 |
images/ojpeg_zackthecat_subsamp22_single_strip.tiff \ |
| 222 |
images/ojpeg_chewey_subsamp21_multi_strip.tiff \ |
| 223 |
images/ojpeg_single_strip_no_rowsperstrip.tiff \ |
| 224 |
images/testfax4.tiff \ |
| 225 |
images/deflate-last-strip-extra-data.tiff \ |
| 226 |
images/custom_dir_EXIF_GPS.tiff \ |
| 227 |
images/testfax3_bug_513.tiff \ |
| 228 |
images/32bpp-None.tiff |
| 229 |
|
| 230 |
PNMIMAGES = \ |
| 231 |
images/minisblack-1c-8b.pgm \ |
| 232 |
images/miniswhite-1c-1b.pbm \ |
| 233 |
images/rgb-3c-16b.ppm \ |
| 234 |
images/rgb-3c-8b.ppm |
| 235 |
|
| 236 |
# This list should include all of the files in the 'images' |
| 237 |
# subdirectory which are intended to be distributed. This may include |
| 238 |
# files which are not currently used by the tests. |
| 239 |
IMAGES_EXTRA_DIST = \ |
| 240 |
images/README.txt \ |
| 241 |
images/miniswhite-1c-1b.g3 \ |
| 242 |
images/test_float64_predictor2_le_lzw.tif \ |
| 243 |
images/test_float64_predictor2_be_lzw.tif \ |
| 244 |
images/tiff_with_subifd_chain.tif \ |
| 245 |
images/test_ifd_loop_to_self.tif \ |
| 246 |
images/test_ifd_loop_to_first.tif \ |
| 247 |
images/test_two_ifds.tif \ |
| 248 |
images/test_ifd_loop_subifd.tif \ |
| 249 |
images/webp_lossless_rgba_alpha_fully_opaque.tif \ |
| 250 |
images/32bpp-None-jpeg.tiff \ |
| 251 |
$(PNMIMAGES) \ |
| 252 |
$(TIFFIMAGES) |
| 253 |
|
| 254 |
noinst_HEADERS = tifftest.h |
| 255 |
|
| 256 |
test_signed_tags_SOURCES = test_signed_tags.c |
| 257 |
test_signed_tags_LDADD = $(LIBTIFF) |
| 258 |
ascii_tag_SOURCES = ascii_tag.c |
| 259 |
ascii_tag_LDADD = $(LIBTIFF) |
| 260 |
long_tag_SOURCES = long_tag.c check_tag.c |
| 261 |
long_tag_LDADD = $(LIBTIFF) |
| 262 |
short_tag_SOURCES = short_tag.c check_tag.c |
| 263 |
short_tag_LDADD = $(LIBTIFF) |
| 264 |
strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h |
| 265 |
strip_rw_LDADD = $(LIBTIFF) |
| 266 |
rewrite_SOURCES = rewrite_tag.c |
| 267 |
rewrite_LDADD = $(LIBTIFF) |
| 268 |
raw_decode_SOURCES = raw_decode.c |
| 269 |
raw_decode_LDADD = $(LIBTIFF) |
| 270 |
custom_dir_SOURCES = custom_dir.c |
| 271 |
custom_dir_LDADD = $(LIBTIFF) |
| 272 |
|
| 273 |
if BUILD_STATIC |
| 274 |
rational_precision2double_SOURCES = rational_precision2double.c |
| 275 |
rational_precision2double_LDADD = $(LIBTIFF) |
| 276 |
rational_precision2double_LDFLAGS = -static |
| 277 |
|
| 278 |
test_write_read_tags_SOURCES = test_write_read_tags.c |
| 279 |
test_write_read_tags_LDADD = $(LIBTIFF) |
| 280 |
test_write_read_tags_LDFLAGS = -static |
| 281 |
|
| 282 |
test_transferfunction_write_read_SOURCES = test_transferfunction_write_read.c |
| 283 |
test_transferfunction_write_read_LDADD = $(LIBTIFF) |
| 284 |
test_transferfunction_write_read_LDFLAGS = -static |
| 285 |
endif |
| 286 |
|
| 287 |
custom_dir_EXIF_231_SOURCES = custom_dir_EXIF_231.c |
| 288 |
custom_dir_EXIF_231_LDADD = $(LIBTIFF) |
| 289 |
defer_strile_loading_SOURCES = defer_strile_loading.c |
| 290 |
defer_strile_loading_LDADD = $(LIBTIFF) |
| 291 |
defer_strile_writing_SOURCES = defer_strile_writing.c |
| 292 |
defer_strile_writing_LDADD = $(LIBTIFF) |
| 293 |
test_directory_SOURCES = test_directory.c |
| 294 |
test_directory_LDADD = $(LIBTIFF) |
| 295 |
test_IFD_enlargement_SOURCES = test_IFD_enlargement.c |
| 296 |
test_IFD_enlargement_LDADD = $(LIBTIFF) |
| 297 |
test_open_options_SOURCES = test_open_options.c |
| 298 |
test_open_options_LDADD = $(LIBTIFF) |
| 299 |
test_append_to_strip_SOURCES = test_append_to_strip.c |
| 300 |
test_append_to_strip_LDADD = $(LIBTIFF) |
| 301 |
test_ifd_loop_detection_CFLAGS = -DSOURCE_DIR=\"@srcdir@\" |
| 302 |
test_ifd_loop_detection_SOURCES = test_ifd_loop_detection.c |
| 303 |
test_ifd_loop_detection_LDADD = $(LIBTIFF) |
| 304 |
|
| 305 |
AM_CPPFLAGS = -I$(top_srcdir)/libtiff |
| 306 |
|
| 307 |
# memcheck: valgrind's memory access checker. |
| 308 |
# |
| 309 |
# The suppressions which come with valgrind are sometimes insufficient |
| 310 |
# to handle certain system library aspects which may be reported and |
| 311 |
# which are unrelated to libtiff. When first starting with a new |
| 312 |
# system (or after a major system update), it is good to execute the |
| 313 |
# test suite (known to already be passing!) like 'make memcheck |
| 314 |
# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind |
| 315 |
# suppression entries in the test log. Make sure that none of the |
| 316 |
# suppressions are due to libtiff itself. Tell valgrind about the |
| 317 |
# suppressions by creating a .valgrindrc file with content like: |
| 318 |
# --memcheck:suppressions=mysupp.supp |
| 319 |
memcheck: |
| 320 |
$(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \ |
| 321 |
--error-exitcode=2 --track-origins=yes --num-callers=12 \ |
| 322 |
--quiet $(VALGRIND_EXTRA_OPTS)' check |
| 323 |
|
| 324 |
# ptrcheck: valgrind's experimental pointer checking tool. |
| 325 |
ptrcheck: |
| 326 |
$(MAKE) MEMCHECK='valgrind --tool=exp-ptrcheck --quiet $(VALGRIND_EXTRA_OPTS)' check |
| 327 |
|
| 328 |
# tiff2bw is pretty lame so currently only the generated scripts |
| 329 |
# tiff2bw-palette-1c-8b.sh, tiff2bw-quad-lzw-compat.sh, and |
| 330 |
# tiff2bw-rgb-3c-8b.sh pass tests. |
| 331 |
generate-tiff2bw-tests: |
| 332 |
for file in $(TIFFIMAGES) ; \ |
| 333 |
do \ |
| 334 |
base=`basename $$file .tiff` ; \ |
| 335 |
testscript=$(srcdir)/tiff2bw-$$base.sh ; \ |
| 336 |
( \ |
| 337 |
echo "#!/bin/sh" ; \ |
| 338 |
echo "# Generated file, master is Makefile.am" ; \ |
| 339 |
echo ". \$${srcdir:-.}/common.sh" ; \ |
| 340 |
echo "infile=\"\$$srcdir/$$file\"" ; \ |
| 341 |
echo "outfile=\"o-tiff2bw-$$base.tiff\"" ; \ |
| 342 |
echo "f_test_convert \"\$$TIFF2BW\" \$$infile \$$outfile" ; \ |
| 343 |
echo "f_tiffinfo_validate \$$outfile" ; \ |
| 344 |
) > $$testscript ; \ |
| 345 |
chmod +x $$testscript ; \ |
| 346 |
done |
| 347 |
|
| 348 |
generate-tiff2rgba-tests: |
| 349 |
for file in $(TIFFIMAGES) ; \ |
| 350 |
do \ |
| 351 |
base=`basename $$file .tiff` ; \ |
| 352 |
testscript=$(srcdir)/tiff2rgba-$$base.sh ; \ |
| 353 |
( \ |
| 354 |
echo "#!/bin/sh" ; \ |
| 355 |
echo "# Generated file, master is Makefile.am" ; \ |
| 356 |
echo ". \$${srcdir:-.}/common.sh" ; \ |
| 357 |
echo "infile=\"\$$srcdir/$$file\"" ; \ |
| 358 |
echo "outfile=\"o-tiff2rgba-$$base.tiff\"" ; \ |
| 359 |
echo "f_test_convert \"\$$TIFF2RGBA\" \$$infile \$$outfile" ; \ |
| 360 |
echo "f_tiffinfo_validate \$$outfile" ; \ |
| 361 |
) > $$testscript ; \ |
| 362 |
chmod +x $$testscript ; \ |
| 363 |
done |
| 364 |
|
| 365 |
# Test rotations |
| 366 |
generate-tiffcrop-R90-tests: |
| 367 |
for file in $(TIFFIMAGES) ; \ |
| 368 |
do \ |
| 369 |
base=`basename $$file .tiff` ; \ |
| 370 |
testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \ |
| 371 |
( \ |
| 372 |
echo "#!/bin/sh" ; \ |
| 373 |
echo "# Generated file, master is Makefile.am" ; \ |
| 374 |
echo ". \$${srcdir:-.}/common.sh" ; \ |
| 375 |
echo "infile=\"\$$srcdir/$$file\"" ; \ |
| 376 |
echo "outfile=\"o-tiffcrop-R90-$$base.tiff\"" ; \ |
| 377 |
echo "f_test_convert \"\$$TIFFCROP -R90\" \$$infile \$$outfile" ; \ |
| 378 |
echo "f_tiffinfo_validate \$$outfile" ; \ |
| 379 |
) > $$testscript ; \ |
| 380 |
chmod +x $$testscript ; \ |
| 381 |
done |
| 382 |
|
| 383 |
# Test flip (mirror) |
| 384 |
generate-tiffcrop-doubleflip-tests: |
| 385 |
for file in $(TIFFIMAGES) ; \ |
| 386 |
do \ |
| 387 |
base=`basename $$file .tiff` ; \ |
| 388 |
testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \ |
| 389 |
( \ |
| 390 |
echo "#!/bin/sh" ; \ |
| 391 |
echo "# Generated file, master is Makefile.am" ; \ |
| 392 |
echo ". \$${srcdir:-.}/common.sh" ; \ |
| 393 |
echo "infile=\"\$$srcdir/$$file\"" ; \ |
| 394 |
echo "outfile=\"o-tiffcrop-doubleflip-$$base.tiff\"" ; \ |
| 395 |
echo "f_test_convert \"\$$TIFFCROP -F both\" \$$infile \$$outfile" ; \ |
| 396 |
echo "f_tiffinfo_validate \$$outfile" ; \ |
| 397 |
) > $$testscript ; \ |
| 398 |
chmod +x $$testscript ; \ |
| 399 |
done |
| 400 |
|
| 401 |
# Test extracting a section 100 pixels wide and 100 pixels high |
| 402 |
generate-tiffcrop-extract-tests: |
| 403 |
for file in $(TIFFIMAGES) ; \ |
| 404 |
do \ |
| 405 |
base=`basename $$file .tiff` ; \ |
| 406 |
testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \ |
| 407 |
( \ |
| 408 |
echo "#!/bin/sh" ; \ |
| 409 |
echo "# Generated file, master is Makefile.am" ; \ |
| 410 |
echo ". \$${srcdir:-.}/common.sh" ; \ |
| 411 |
echo "infile=\"\$$srcdir/$$file\"" ; \ |
| 412 |
echo "outfile=\"o-tiffcrop-extract-$$base.tiff\"" ; \ |
| 413 |
echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 60 -Y 60\" \$$infile \$$outfile" ; \ |
| 414 |
echo "f_tiffinfo_validate \$$outfile" ; \ |
| 415 |
) > $$testscript ; \ |
| 416 |
chmod +x $$testscript ; \ |
| 417 |
done |
| 418 |
|
| 419 |
# Test extracting the first and fourth quarters from the left side. |
| 420 |
generate-tiffcrop-extractz14-tests: |
| 421 |
for file in $(TIFFIMAGES) ; \ |
| 422 |
do \ |
| 423 |
base=`basename $$file .tiff` ; \ |
| 424 |
testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \ |
| 425 |
( \ |
| 426 |
echo "#!/bin/sh" ; \ |
| 427 |
echo "# Generated file, master is Makefile.am" ; \ |
| 428 |
echo ". \$${srcdir:-.}/common.sh" ; \ |
| 429 |
echo "infile=\"\$$srcdir/$$file\"" ; \ |
| 430 |
echo "outfile=\"o-tiffcrop-extractz14-$$base.tiff\"" ; \ |
| 431 |
echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \$$infile \$$outfile" ; \ |
| 432 |
echo "f_tiffinfo_validate \$$outfile" ; \ |
| 433 |
) > $$testscript ; \ |
| 434 |
chmod +x $$testscript ; \ |
| 435 |
done |
| 436 |
|
| 437 |
generate-tiffcrop-tests: \ |
| 438 |
generate-tiffcrop-R90-tests \ |
| 439 |
generate-tiffcrop-doubleflip-tests \ |
| 440 |
generate-tiffcrop-extract-tests \ |
| 441 |
generate-tiffcrop-extractz14-tests |
| 442 |
|
| 443 |
generate-tests: \ |
| 444 |
generate-tiff2bw-tests \ |
| 445 |
generate-tiff2rgba-tests \ |
| 446 |
generate-tiffcrop-tests |