[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.
diff --git a/ANNOUNCE b/ANNOUNCE
index 050f30e..5cff8c1 100644
--- a/ANNOUNCE
+++ b/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 @@
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
diff --git a/CHANGES b/CHANGES
index 4e62d12..dec424f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3606,7 +3606,10 @@
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
diff --git a/pngtest.c b/pngtest.c
index 5698777..76fc9ef 100644
--- a/pngtest.c
+++ b/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 @@
#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 @@
FCLOSE(fpin);
FCLOSE(fpout);
- return (0);
+
+ if (strict != 0)
+ return (1);
+
+ else
+ return (0);
}
if (!num_in)
@@ -1504,7 +1510,12 @@
FCLOSE(fpin);
FCLOSE(fpout);
- return (0);
+
+ if (strict != 0)
+ return (1);
+
+ else
+ return (0);
}
}
@@ -1586,6 +1597,14 @@
inname = argv[2];
}
+ else if (strcmp(argv[1], "--strict") == 0)
+ {
+ status_dots_requested = 0;
+ verbose = 1;
+ inname = argv[2];
+ strict++;
+ }
+
else
{
inname = argv[1];
diff --git a/test-pngtest.sh b/test-pngtest.sh
index 5d12f4a..bba128b 100755
--- a/test-pngtest.sh
+++ b/test-pngtest.sh
@@ -5,4 +5,12 @@
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