[libpng15]` Revised test-pngtest.sh to report FAIL when pngtest fails.
Added "--strict" option to pngtest, to report FAIL when the failure is only because the resulting valid files are different.
This commit is contained in:
parent
f573ff7792
commit
8e25a61277
7
ANNOUNCE
7
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.5.6beta03 - September 26, 2011
|
||||
Libpng 1.5.6beta03 - September 27, 2011
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@ -45,7 +45,10 @@ Version 1.5.6beta02 [Septhember 26, 2011]
|
||||
once with a particular info_ptr.
|
||||
Fixed a typo in the definition of the new PNG_STRING_FROM_CHUNK(s,c) macro.
|
||||
|
||||
Version 1.5.6beta03 [September 26, 2011]
|
||||
Version 1.5.6beta03 [September 27, 2011]
|
||||
Revised test-pngtest.sh to report FAIL when pngtest fails.
|
||||
Added "--strict" option to pngtest, to report FAIL when the failure is
|
||||
only because the resulting valid files are different.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||
(subscription required; visit
|
||||
|
5
CHANGES
5
CHANGES
@ -3606,7 +3606,10 @@ Version 1.5.6beta02 [Septhember 26, 2011]
|
||||
once with a particular info_ptr.
|
||||
Fixed a typo in the definition of the new PNG_STRING_FROM_CHUNK(s,c) macro.
|
||||
|
||||
Version 1.5.6beta03 [September 26, 2011]
|
||||
Version 1.5.6beta03 [September 27, 2011]
|
||||
Revised test-pngtest.sh to report FAIL when pngtest fails.
|
||||
Added "--strict" option to pngtest, to report FAIL when the failure is
|
||||
only because the resulting valid files are different.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
25
pngtest.c
25
pngtest.c
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngtest.c - a simple test program to test libpng
|
||||
*
|
||||
* Last changed in libpng 1.5.4 [July 7, 2011]
|
||||
* Last changed in libpng 1.5.6 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@ -98,6 +98,7 @@ static char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present";
|
||||
#endif
|
||||
|
||||
static int verbose = 0;
|
||||
static int strict = 0;
|
||||
|
||||
int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname));
|
||||
|
||||
@ -1479,7 +1480,12 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
|
||||
FCLOSE(fpin);
|
||||
FCLOSE(fpout);
|
||||
return (0);
|
||||
|
||||
if (strict != 0)
|
||||
return (1);
|
||||
|
||||
else
|
||||
return (0);
|
||||
}
|
||||
|
||||
if (!num_in)
|
||||
@ -1504,7 +1510,12 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
|
||||
|
||||
FCLOSE(fpin);
|
||||
FCLOSE(fpout);
|
||||
return (0);
|
||||
|
||||
if (strict != 0)
|
||||
return (1);
|
||||
|
||||
else
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1586,6 +1597,14 @@ main(int argc, char *argv[])
|
||||
inname = argv[2];
|
||||
}
|
||||
|
||||
else if (strcmp(argv[1], "--strict") == 0)
|
||||
{
|
||||
status_dots_requested = 0;
|
||||
verbose = 1;
|
||||
inname = argv[2];
|
||||
strict++;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
inname = argv[1];
|
||||
|
@ -5,4 +5,12 @@ echo "Running tests. For details see pngtest-log.txt"
|
||||
echo "============ pngtest pngtest.png ==============" > pngtest-log.txt
|
||||
|
||||
echo "Running test-pngtest.sh"
|
||||
./pngtest ${srcdir}/pngtest.png >> pngtest-log.txt 2>&1
|
||||
if ./pngtest --strict ${srcdir}/pngtest.png >> pngtest-log.txt 2>&1
|
||||
then
|
||||
echo " PASS: pngtest --strict pngtest.png"
|
||||
err=0
|
||||
else
|
||||
echo " FAIL: pngtest --strict pngtest.png"
|
||||
err=1
|
||||
fi
|
||||
exit $err
|
||||
|
Loading…
Reference in New Issue
Block a user