Received: from mailgate002.isp.belgacom.be (mailgate002.isp.belgacom.be [195.238.6.87])
	by maildelivery003.isp.belgacom.be (Postfix) with ESMTP id 7FCB21D802C
	for <joris.at.lebbeke@skynet.be>; Thu, 13 Sep 2007 21:56:18 +0200 (CEST)
Received: from r153.dmsolutions.ca (HELO duke.maptools.org) ([209.217.116.153])
  by in.mx.skynet.be with ESMTP; 13 Sep 2007 21:56:23 +0200
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l8DJfuJJ028420;
	Thu, 13 Sep 2007 15:43:18 -0400
Received: from mail.howardsilvan.com (gateway.howardsilvan.com [64.146.212.27])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id l8DJfrt6028416
	for <tiff@lists.maptools.org>; Thu, 13 Sep 2007 15:41:54 -0400
Received: by mail.howardsilvan.com (Postfix, from userid 501)
	id 8BF371A40AD5; Thu, 13 Sep 2007 12:41:51 -0700 (PDT)
Received: from [192.168.0.1] (bilbo.x101.com [192.168.0.1])
	by mail.howardsilvan.com (Postfix) with ESMTP id 0E30A1A40A2B;
	Thu, 13 Sep 2007 12:41:46 -0700 (PDT)
Message-ID: <46E9927A.1020301@howardsilvan.com>
Date: Thu, 13 Sep 2007 12:41:46 -0700
From: Lee Howard <faxguy@howardsilvan.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.7.13) Gecko/20060501 Fedora/1.7.13-1.1.fc4
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Subject: Re: [Tiff] bug reporting and state-of-the-project query
References: <46E75CCE.8090308@howardsilvan.com> <46E7774B.4090706@pobox.com>
	<46E8C739.4060104@howardsilvan.com>
	<Pine.SOC.4.60.0709130925570.19162@blade.simplesystems.org>
In-Reply-To: <Pine.SOC.4.60.0709130925570.19162@blade.simplesystems.org>
Content-Type: multipart/mixed; boundary="------------020601020906090301010906"
Cc: TIFF mailing list <tiff@lists.maptools.org>
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.000027b9
X-MSP-STORE: Thu, 13 Sep 2007 21:56:18 +0200
Status: RO

This is a multi-part message in MIME format.
--------------020601020906090301010906
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Bob Friesenhahn wrote:

> What is needed are a set of small Unix shell scripts designed to fit 
> into libtiff's existing test suite.  These scripts would test libtiff 
> using the libtiff utilities.  Besides validating libtiff, this would 
> help validate the utilities used.
>
> Care to volunteer?


Attached is a start.

I typically only use bilevel images, and so this script only tests the 
basic functionality of the bilevel utilities.  I would be happy to 
continue to develop this test script to test more thoroughly the 
specific features of the various utilities as well as set up tests for 
color or greyscale images, but I don't have a lot of time right now to 
do it, and this start should get us going in the right direction (and 
hopefully will see some fixes made and discussion generated).

I assume that you have a set of bilevel TIFF test images.  Simply run 
this script against each one like this:

  ./libtiff-test_utilities-bilevel filename.tif

The expected output is merely a stream of lines like this:

Testing fax2ps ... success
Testing tiffsplit ... success
Testing tiffinfo ... success
Testing tiffdump ... success

If the utilitiy produces unexpected output (i.e. output on stderr) it 
will be displayed and if the utilitiy exits with a non-zero value then 
"FAILED" will be displayed as well.

Tested against 3.9.0beta I get failed tests on these tests:

Testing tiff2ps -1 ... FAILED!
Testing tiff2ps -2 ... FAILED!
Testing tiff2ps -3 ... FAILED!
Testing tiff2pdf ... FAILED!

And I get unexpected (stderr) output on those tests (expected error 
messages) as well as what appears to be debugging output (that should 
probably not be displayed by default) on the thumbnail test.

If you need a bilevel image to test with you can get one here:

http://bugzilla.remotesensing.org/show_bug.cgi?id=1585

Thanks,

Lee.


--------------020601020906090301010906
Content-Type: text/plain;
 name="libtiff-test_utilities-bilevel"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="libtiff-test_utilities-bilevel"

#!/bin/sh

if [ ! -r $1 ]; then 
    echo "This script only takes one bi-level TIFF file as an input option."
    exit 1
fi

#
# test tiffsplit simple functionality
#
printf "Testing tiffsplit ... "
tiffsplit $1 deleteme-$$
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$-*.tif

#
# test tiffinfo with "additional display" features
#
printf "Testing tiffinfo ... "
tiffinfo -c -D -d -j -s $1 > /dev/null
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi

#
# test tiffdump
#
printf "Testing tiffdump ... "
tiffdump $1 > /dev/null
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi

#
# test tiffcp
#
printf "Testing tiffcp -c g3 ... "
tiffcp -c g3 $1 deleteme-$$.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$.tif
printf "Testing tiffcp -c g3:1d ... "
tiffcp -c g3:1d $1 deleteme-$$.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$.tif
printf "Testing tiffcp -c g3:2d ... "
tiffcp -c g3:2d $1 deleteme-$$.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$.tif
printf "Testing tiffcp -c g3:1d:fill ... "
tiffcp -c g3:1d:fill $1 deleteme-$$.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$.tif
printf "Testing tiffcp -c g3:2d:fill ... "
tiffcp -c g3:2d:fill $1 deleteme-$$.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$.tif
printf "Testing tiffcp -c g4 ... "
tiffcp -c g4 $1 deleteme-$$.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$.tif
printf "Testing tiffcp -c jbig ... "
tiffcp -c jbig $1 deleteme-$$.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$.tif

#
# test tiffsplit + tiffcp (split-then-rejoin)
#
printf "Testing tiffsplit + tiffcp ..."
mkdir deleteme-$$
tiffcp $1 deleteme-$$/original.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    cd deleteme-$$
    tiffsplit original.tif
    if [ $? != 0 ]; then
	echo "FAILED!"
    else
	tiffcp * new.tif
	if [ $? != 0 ]; then
	    echo "FAILED!"
	else
	    echo "success"
	fi
    fi
    cd ..
fi
rm -rf deleteme-$$

#
# test tiff2ps
#
printf "Testing tiff2ps -1 ... "
tiff2ps -a -1 $1 > /dev/null
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
printf "Testing tiff2ps -2 ... "
tiff2ps -a -2 $1 > /dev/null
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
printf "Testing tiff2ps -3 ... "
tiff2ps -a -3 $1 > /dev/null
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
printf "Testing tiff2ps -e ... "
tiff2ps -a -e -1 $1 > /dev/null
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi

#
# test tiff2pdf
#
printf "Testing tiff2pdf ... "
tiff2pdf -o deleteme-$$.pdf $1
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi
rm -f deleteme-$$.pdf

#
# test thumbnail
#
printf "Testing thumbnail ... "
tiffcp -c g3:1d $1 deleteme-$$.tif
if [ $? != 0 ]; then
    echo "FAILED!"
else
    thumbnail deleteme-$$.tif deleteme2-$$.tif
    if [ $? != 0 ]; then
	echo "FAILED!"
    else
	echo "success"
    fi
    rm -f deleteme2-$$.tif
fi
rm -f deleteme-$$.tif

#
# test fax2ps
#
printf "Testing fax2ps ... "
fax2ps $1 > /dev/null
if [ $? != 0 ]; then
    echo "FAILED!"
else
    echo "success"
fi

--------------020601020906090301010906
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--------------020601020906090301010906--
