diff mbox series

[bug#64711,12/43] gnu: mpfr: Skip failing test on the Hurd.

Message ID e4f0657ff48efca27f22313001161a360b9aac3a.1689690897.git.janneke@gnu.org
State New
Headers show
Series Fix builds and skip failing tests for the Hurd. | expand

Commit Message

Janneke Nieuwenhuizen July 18, 2023, 2:40 p.m. UTC
* gnu/packages/multiprecision.scm (mpfr)[arguments]: When building natively on
the Hurd, add 'skip-tests' phase to skip "tsprintf".
---
 gnu/packages/multiprecision.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Ludovic Courtès July 18, 2023, 5:57 p.m. UTC | #1
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

> * gnu/packages/multiprecision.scm (mpfr)[arguments]: When building natively on
> the Hurd, add 'skip-tests' phase to skip "tsprintf".

[...]

> +     #:phases (if (system-hurd?)

A side note on this, which predates this patch series: there no other
‘system-’ predicate; I think it may have been clearer to use
(target-hurd?) or (and (not (%current-target-system)) (target-hurd?)) or
similar, as is done for other platforms.

> +                          (substitute*
> +                              "tests/tsprintf.c"

On a single line please.  :-)

(I wonder why it’s failing; is it a problem of precision on 32-bit
platforms, or just on i586?)

Ludo’.
diff mbox series

Patch

diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index 51ba21162c..3aa5dccfab 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -9,6 +9,7 @@ 
 ;;; Copyright © 2018, 2019, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -126,6 +127,17 @@  (define-public mpfr
                                 ".tar.xz"))
             (sha256 (base32
                      "14yr4sf4mys64nzbgnd997l6l4n8l9vsjnnvnb0lh4jh2ggpi8q6"))))
+   (arguments
+    (list
+     #:phases (if (system-hurd?)
+                  #~(modify-phases %standard-phases
+                      (add-after 'unpack 'skip-tests
+                        (lambda _
+                          (substitute*
+                              "tests/tsprintf.c"
+                            (("(^| )main *\\(.*" all)
+                             (string-append all "{\n  exit (77);//"))))))
+                  #~%standard-phases)))
    (build-system gnu-build-system)
    (outputs '("out" "debug"))
    (propagated-inputs (list gmp))            ; <mpfr.h> refers to <gmp.h>