summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-10-07 22:27:29 +0200
committerLudovic Courtès <ludo@gnu.org>2022-10-08 12:27:01 +0200
commit4b2b8b31d702154334bccbd4fc61adfb5c91c83e (patch)
treeca268b922b61137f1e0484c43c178dc0ca3f5887 /gnu
parente49255ff18def1065f65194f679a1d07fd5a266e (diff)
downloadguix-4b2b8b31d702154334bccbd4fc61adfb5c91c83e.tar.gz
gnu: upower: Fix test failure on i686-linux.
* gnu/packages/gnome.scm (upower)[arguments]: Add
'adjust-test-for-excess-precision' when 'target-x86-32?' returns true.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/gnome.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 23ede13958..6f44bd6a39 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5819,7 +5819,19 @@ faster results and to avoid unnecessary server load.")
               ;; If not specified, udev will try putting history information
               ;; in /gnu/store.
               "-Dhistorydir=/var/lib/upower"
-              (string-append "-Dudevrulesdir=" #$output "/bin/udev/rules.d"))))
+              (string-append "-Dudevrulesdir=" #$output "/bin/udev/rules.d"))
+      #:phases (if (target-x86-32?)
+                   #~(modify-phases %standard-phases
+                       (add-after 'unpack 'adjust-test-for-excess-precision
+                         (lambda _
+                           ;; Address test failure caused by excess precision
+                           ;; on i686:
+                           ;; <https://gitlab.freedesktop.org/upower/upower/-/issues/214>.
+                           (substitute* "src/linux/integration-test.py"
+                             (("assertEqual(.*)40\\.0" _ middle)
+                              (string-append
+                               "assertAlmostEqual" middle "40.0"))))))
+                   #~%standard-phases)))
     (native-inputs
      (list `(,glib "bin")               ; for gdbus-codegen
            gobject-introspection