File: 1004-use-imagemagick-compare-for-testsuite.patch

package info (click to toggle)
png%2B%2B 0.2.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 4,412 kB
  • sloc: cpp: 3,070; makefile: 111; sh: 51
file content (23 lines) | stat: -rw-r--r-- 1,135 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Use imagemagick's compare for the testsuite, and compare with fuzz
 As changing colorspace might introduce rounding errors, a binary comparison
 will lead to false failures in the test suite. This patch ceased to use cmp
 but uses compare with a very low fuzz of 0.5% to see if the image is same, it
 is used for all tests with convert_colorspace.
 See also http://www.libpng.org/pub/png/spec/1.2/PNG-Encoders.html for
 rationale.
Author: Tobias Frost <tobi@debian.org>
Forwarded: no (upstream BTS currently down)
Last-Update: 2018-04-13
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/test.sh
+++ b/test/test.sh
@@ -22,7 +22,7 @@
         for k in 8 16; do
             for p in PB PB2; do     # this tests solid buffer vs. original
                 name=$i.$j.$k.out   # no $p in the name, they should not differ
-                run "./convert_color_space $j $k $p $i out/$name && cmp out/$name cmp/$name"
+                run "./convert_color_space $j $k $p $i out/$name && compare -verbose -metric AE -fuzz 0.5% out/$name cmp/$name null:"
             done;
         done;
     done;