guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: potrace: Relax unit tests.


From: Ludovic Courtès
Subject: 01/01: gnu: potrace: Relax unit tests.
Date: Sat, 6 Jan 2018 17:38:53 -0500 (EST)

civodul pushed a commit to branch core-updates
in repository guix.

commit a4258dfa62bf4f59ce450a17f3663f85be5c0ce9
Author: Ludovic Courtès <address@hidden>
Date:   Sat Jan 6 20:59:01 2018 +0100

    gnu: potrace: Relax unit tests.
    
    * gnu/packages/patches/potrace-tests.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/fontutils.scm (potrace)[source]: Use it.
---
 gnu/local.mk                             |  3 +-
 gnu/packages/fontutils.scm               |  3 +-
 gnu/packages/patches/potrace-tests.patch | 50 ++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 6308a81..8ed01eb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès 
<address@hidden>
+# Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès 
<address@hidden>
 # Copyright © 2013, 2014, 2015, 2016, 2017 Andreas Enge <address@hidden>
 # Copyright © 2016 Mathieu Lirzin <address@hidden>
 # Copyright © 2013, 2014, 2015, 2016, 2017 Mark H Weaver <address@hidden>
@@ -959,6 +959,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/policycoreutils-make-sepolicy-use-python3.patch \
   %D%/packages/patches/portaudio-audacity-compat.patch         \
   %D%/packages/patches/portmidi-modular-build.patch            \
+  %D%/packages/patches/potrace-tests.patch                     \
   %D%/packages/patches/procmail-ambiguous-getline-debian.patch  \
   %D%/packages/patches/procmail-CVE-2014-3618.patch            \
   %D%/packages/patches/procmail-CVE-2017-16844.patch           \
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index d6c093c..666c68f 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -406,7 +406,8 @@ and returns a sequence of positioned glyphids from the 
font.")
                           "/potrace-" version ".tar.gz"))
       (sha256
        (base32
-        "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9"))))
+        "17ajildjp14shsy339xarh1lw1p0k60la08ahl638a73mh23kcx9"))
+      (patches (search-patches "potrace-tests.patch"))))
     (build-system gnu-build-system)
     (native-inputs `(("ghostscript" ,ghostscript))) ;for tests
     (inputs `(("zlib" ,zlib)))
diff --git a/gnu/packages/patches/potrace-tests.patch 
b/gnu/packages/patches/potrace-tests.patch
new file mode 100644
index 0000000..407be98
--- /dev/null
+++ b/gnu/packages/patches/potrace-tests.patch
@@ -0,0 +1,50 @@
+This relaxes the comparison threshold between the reference data
+and the bitmaps produced by Ghostscript interpreting the vectorized
+image.  Apparently the threshold has become too low with the switch
+to from Ghostscript 2.21 to 2.22.
+
+--- potrace-1.15/check/postscript-check.sh     2018-01-06 19:47:26.194900686 
+0100
++++ potrace-1.15/check/postscript-check.sh     2018-01-06 19:51:35.937503739 
+0100
+@@ -70,15 +70,15 @@ if test $? -ne 0; then
+     echo "Something is wrong with $GS; skipping this test" >& 2
+     exit 77
+ fi 
+-actiondiff "$TMP2" "$REFDATA" 1000
++actiondiff "$TMP2" "$REFDATA" 1500
+ 
+ action $POTRACE -r50 -p -L 0 -B 0 --opaque -o "$TMP1" "$DATA"
+ action "$GS" -q -dNOPAUSE -sDEVICE=pbmraw -g460x394 -r100x100 
-sOutputFile="$TMP2" -- "$TMP1"
+-actiondiff "$TMP2" "$REFDATA" 1200
++actiondiff "$TMP2" "$REFDATA" 1500
+ 
+ action $POTRACE -r50 -p -L 0 -B 0 -A 160 -o "$TMP1" "$DATA"
+ action "$GS" -q -dNOPAUSE -sDEVICE=pbmraw -g568x528 -r100x100 
-sOutputFile="$TMP2" -- "$TMP1"
+-actiondiff "$TMP2" "$REFDATAROT" 1200
++actiondiff "$TMP2" "$REFDATAROT" 1500
+ 
+ action rm -f "$TMP1"
+ action rm -f "$TMP2"
+
+--- potrace-1.15/check/pdf-check.sh    2018-01-06 19:47:28.698886663 +0100
++++ potrace-1.15/check/pdf-check.sh    2018-01-06 20:54:14.895460329 +0100
+@@ -72,15 +72,15 @@ if test $? -ne 0 -o ! -f "$TMP2"; then
+     echo "GS does not understand PDF; skipping this test" >& 2
+     exit 77
+ fi 
+-actiondiff "$TMP2" "$REFDATA" 1000
++actiondiff "$TMP2" "$REFDATA" 1500
+ 
+ action $POTRACE -r50 -p -L 0 -B 0 --opaque -b pdf -o "$TMP1" "$DATA"
+ action "$GS" -q -dNOPAUSE -sDEVICE=pbmraw -g460x394 -r100x100 
-sOutputFile="$TMP2" -- "$TMP1"
+-actiondiff "$TMP2" "$REFDATA" 1200
++actiondiff "$TMP2" "$REFDATA" 1500
+ 
+ action $POTRACE -r50 -p -L 0 -B 0 -A 160 -b pdf -o "$TMP1" "$DATA"
+ action "$GS" -q -dNOPAUSE -sDEVICE=pbmraw -g568x528 -r100x100 
-sOutputFile="$TMP2" -- "$TMP1"
+-actiondiff "$TMP2" "$REFDATAROT" 1200
++actiondiff "$TMP2" "$REFDATAROT" 1500
+ 
+ action rm -f "$TMP1"
+ action rm -f "$TMP2"
+
+Diff finished.  Sat Jan  6 20:54:50 2018



reply via email to

[Prev in Thread] Current Thread [Next in Thread]