From d11d27e2e4a0e6d132127f5130533b0ce9d04481 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 27 May 2022 11:48:14 -0400 Subject: 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. --- gnu/packages/guile-xyz.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'gnu/packages/guile-xyz.scm') 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") -- cgit v1.2.3