Skip to content

Commit 3237e5e

Browse files
committedAug 23, 2009
* test/Makefile.am, test/tiffcrop*.sh: Split previously existing
tiffcrop.sh into a collection of many specific tests.
1 parent b44da14 commit 3237e5e

35 files changed

+443
-103
lines changed
 

‎ChangeLog

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2009-08-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
2+
3+
* test/Makefile.am, test/tiffcrop*.sh: Split previously existing
4+
tiffcrop.sh into a collection of many specific tests.
5+
16
2009-08-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
27

38
* test/tiffcp-logluv.sh: Fix test so that it works with a VPATH

‎test/Makefile.am

+120-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,18 @@ LIBTIFF = $(top_builddir)/libtiff/libtiff.la
2929

3030
EXTRA_DIST = \
3131
$(TESTSCRIPTS) \
32-
$(IMAGES) \
32+
$(IMAGES_EXTRA_DIST) \
3333
common.sh
3434

3535
# All of the tests to execute via 'make check'
3636
TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
3737

3838
# Tests which are expected to fail
39-
XFAIL_TESTS =
39+
XFAIL_TESTS = \
40+
tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
41+
tiffcrop-extract-minisblack-2c-8b-alpha.sh \
42+
tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
43+
tiffcrop-R90-minisblack-2c-8b-alpha.sh
4044

4145
# Extra files which should be cleaned by 'make clean'
4246
CLEANFILES = test_packbits.tif deleteme*
@@ -63,21 +67,68 @@ TESTSCRIPTS = \
6367
tiff2ps-PS3.sh \
6468
tiff2ps-EPS1.sh \
6569
tiff2pdf.sh \
66-
tiffcrop.sh \
70+
tiffcrop-doubleflip-logluv-3c-16b.sh \
71+
tiffcrop-doubleflip-minisblack-1c-16b.sh \
72+
tiffcrop-doubleflip-minisblack-1c-8b.sh \
73+
tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
74+
tiffcrop-doubleflip-miniswhite-1c-1b.sh \
75+
tiffcrop-doubleflip-palette-1c-1b.sh \
76+
tiffcrop-doubleflip-palette-1c-4b.sh \
77+
tiffcrop-doubleflip-palette-1c-8b.sh \
78+
tiffcrop-doubleflip-rgb-3c-16b.sh \
79+
tiffcrop-doubleflip-rgb-3c-8b.sh \
80+
tiffcrop-extract-logluv-3c-16b.sh \
81+
tiffcrop-extract-minisblack-1c-16b.sh \
82+
tiffcrop-extract-minisblack-1c-8b.sh \
83+
tiffcrop-extract-minisblack-2c-8b-alpha.sh \
84+
tiffcrop-extract-miniswhite-1c-1b.sh \
85+
tiffcrop-extract-palette-1c-1b.sh \
86+
tiffcrop-extract-palette-1c-4b.sh \
87+
tiffcrop-extract-palette-1c-8b.sh \
88+
tiffcrop-extract-rgb-3c-16b.sh \
89+
tiffcrop-extract-rgb-3c-8b.sh \
90+
tiffcrop-extractz14-logluv-3c-16b.sh \
91+
tiffcrop-extractz14-minisblack-1c-16b.sh \
92+
tiffcrop-extractz14-minisblack-1c-8b.sh \
93+
tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
94+
tiffcrop-extractz14-miniswhite-1c-1b.sh \
95+
tiffcrop-extractz14-palette-1c-1b.sh \
96+
tiffcrop-extractz14-palette-1c-4b.sh \
97+
tiffcrop-extractz14-palette-1c-8b.sh \
98+
tiffcrop-extractz14-rgb-3c-16b.sh \
99+
tiffcrop-extractz14-rgb-3c-8b.sh \
100+
tiffcrop-R90-logluv-3c-16b.sh \
101+
tiffcrop-R90-minisblack-1c-16b.sh \
102+
tiffcrop-R90-minisblack-1c-8b.sh \
103+
tiffcrop-R90-minisblack-2c-8b-alpha.sh \
104+
tiffcrop-R90-miniswhite-1c-1b.sh \
105+
tiffcrop-R90-palette-1c-1b.sh \
106+
tiffcrop-R90-palette-1c-4b.sh \
107+
tiffcrop-R90-palette-1c-8b.sh \
108+
tiffcrop-R90-rgb-3c-16b.sh \
109+
tiffcrop-R90-rgb-3c-8b.sh \
67110
tiff2rgba.sh
68111

69-
IMAGES = \
112+
# This list should contain all of the TIFF files in the 'images'
113+
# subdirectory which are intended to be used as input images for
114+
# tests. All of these files should use the extension ".tiff".
115+
TIFFIMAGES = \
116+
images/logluv-3c-16b.tiff \
70117
images/minisblack-1c-16b.tiff \
71118
images/minisblack-1c-8b.tiff \
119+
images/minisblack-2c-8b-alpha.tiff \
72120
images/miniswhite-1c-1b.tiff \
73-
images/miniswhite-2c-8b-alpha.tiff \
74121
images/palette-1c-1b.tiff \
75122
images/palette-1c-4b.tiff \
76123
images/palette-1c-8b.tiff \
77-
images/README.txt \
78-
images/logluv-3c-16b.tiff \
79124
images/rgb-3c-16b.tiff \
80-
images/rgb-3c-8b.tiff
125+
images/rgb-3c-8b.tiff
126+
127+
# This list should include all of the files in the 'images'
128+
# subdirectory which are intended to be distributed.
129+
IMAGES_EXTRA_DIST = \
130+
images/README.txt \
131+
$(TIFFIMAGES)
81132

82133
noinst_HEADERS = tifftest.h
83134

@@ -94,3 +145,64 @@ rewrite_LDADD = $(LIBTIFF)
94145

95146
INCLUDES = -I$(top_srcdir)/libtiff
96147

148+
# Test rotations
149+
generate-tiffcrop-R90-tests:
150+
for file in $(TIFFIMAGES) ; \
151+
do \
152+
base=`basename $$file .tiff` ; \
153+
testscript=$(srcdir)/tiffcrop-R90-$$base.sh ; \
154+
( \
155+
echo "#!/bin/sh" ; \
156+
echo ". \$${srcdir:-.}/common.sh" ; \
157+
echo "f_test_convert \"\$$TIFFCROP -R90\" \"\$$srcdir/$$file\" \"deleteme-tiffcrop-R90-$$base.tiff\"" ; \
158+
) > $$testscript ; \
159+
chmod +x $$testscript ; \
160+
done
161+
162+
# Test flip (mirror)
163+
generate-tiffcrop-doubleflip-tests:
164+
for file in $(TIFFIMAGES) ; \
165+
do \
166+
base=`basename $$file .tiff` ; \
167+
testscript=$(srcdir)/tiffcrop-doubleflip-$$base.sh ; \
168+
( \
169+
echo "#!/bin/sh" ; \
170+
echo ". \$${srcdir:-.}/common.sh" ; \
171+
echo "f_test_convert \"\$$TIFFCROP -F both\" \"\$$srcdir/$$file\" \"deleteme-tiffcrop-doubleflip-$$base.tiff\"" ; \
172+
) > $$testscript ; \
173+
chmod +x $$testscript ; \
174+
done
175+
176+
# Test extracting a section 100 pixels wide and 100 pixels high
177+
generate-tiffcrop-extract-tests:
178+
for file in $(TIFFIMAGES) ; \
179+
do \
180+
base=`basename $$file .tiff` ; \
181+
testscript=$(srcdir)/tiffcrop-extract-$$base.sh ; \
182+
( \
183+
echo "#!/bin/sh" ; \
184+
echo ". \$${srcdir:-.}/common.sh" ; \
185+
echo "f_test_convert \"\$$TIFFCROP -U px -E top -X 100 -Y 100\" \"\$$srcdir/$$file\" \"deleteme-tiffcrop-extract-$$base.tiff\"" ; \
186+
) > $$testscript ; \
187+
chmod +x $$testscript ; \
188+
done
189+
190+
# Test extracting the first and fourth quarters from the left side.
191+
generate-tiffcrop-extractz14-tests:
192+
for file in $(TIFFIMAGES) ; \
193+
do \
194+
base=`basename $$file .tiff` ; \
195+
testscript=$(srcdir)/tiffcrop-extractz14-$$base.sh ; \
196+
( \
197+
echo "#!/bin/sh" ; \
198+
echo ". \$${srcdir:-.}/common.sh" ; \
199+
echo "f_test_convert \"\$$TIFFCROP -E left -Z1:4,2:4\" \"\$$srcdir/$$file\" \"deleteme-tiffcrop-extractz14-$$base.tiff\"" ; \
200+
) > $$testscript ; \
201+
chmod +x $$testscript ; \
202+
done
203+
204+
generate-tiffcrop-tests: \
205+
generate-tiffcrop-R90-tests \
206+
generate-tiffcrop-doubleflip-tests \
207+
generate-tiffcrop-extract-tests \
208+
generate-tiffcrop-extractz14-tests

0 commit comments

Comments
 (0)