summary refs log tree commit diff
path: root/gnu/packages/guile-xyz.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-27 11:48:14 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-31 11:20:28 -0400
commitd11d27e2e4a0e6d132127f5130533b0ce9d04481 (patch)
treef107bbd45293c7810fc1420bca6b66c416ef3e5d /gnu/packages/guile-xyz.scm
parent34c8558af2d0a72a7f90dab9106addbf9b3e6c5f (diff)
downloadguix-d11d27e2e4a0e6d132127f5130533b0ce9d04481.tar.gz
gnu: guile-ac-d-bus: Run test suite.
* gnu/packages/patches/guile-ac-d-bus-fix-tests.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/guile-xyz.scm (guile-ac-d-bus)
[source]: Apply patch.
[phases]{check}: New phase.
[native-inputs]: Add bash-minimal.
Diffstat (limited to 'gnu/packages/guile-xyz.scm')
-rw-r--r--gnu/packages/guile-xyz.scm15
1 files changed, 13 insertions, 2 deletions
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 0b1537a963..3c02a85bc3 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -3843,7 +3843,8 @@ and space linear in the size of the input text.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0rl809qimhgz6b0rixakb42r2l4g53jr09a2g0s1hxgab0blz0kb"))))
+                "0rl809qimhgz6b0rixakb42r2l4g53jr09a2g0s1hxgab0blz0kb"))
+              (patches (search-patches "guile-ac-d-bus-fix-tests.patch"))))
     (build-system guile-build-system)
     (arguments
      (list
@@ -3884,12 +3885,22 @@ and space linear in the size of the input text.")
             (lambda _
               (with-directory-excursion "docs"
                 (invoke "makeinfo" "ac-d-bus"))))
+          (add-after 'build-doc 'check
+            (lambda* (#:key (tests? #t) #:allow-other-keys)
+              (when tests?
+                ;; There is no locale for the รถ character, which crashes
+                ;; substitute*; reset the conversion strategy to workaround it.
+                (with-fluids ((%default-port-conversion-strategy 'substitute))
+                  (substitute* (find-files "tests")
+                    (("#!/usr/bin/env scheme-script")
+                     (string-append "#!" (which "guile")))))
+                (invoke "./run-tests.sh"))))
           (add-after 'install 'install-doc
             (lambda _
               (install-file "docs/ac-d-bus.info"
                             (string-append #$output "/share/info")))))))
     (native-inputs
-     (list guile-3.0 texinfo))
+     (list bash-minimal guile-3.0 texinfo))
     (propagated-inputs
      (list guile-packrat))
     (synopsis "D-Bus protocol implementation in R6RS Scheme")