sharlatan pushed a commit to branch go-team
in repository guix.

commit 1434e3aeeab176d6271f912066a0b4eb18bd7759
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Sun Jul 28 22:44:14 2024 +0100

    gnu: go-github-com-emersion-go-msgauth: Enable tests.
    
    * gnu/packages/golang-web.scm (go-github-com-emersion-go-msgauth):
    Enable tests.
    [arguments]: <#:phases>: Add custom 'check phase.
    
    Change-Id: I126a688146bc4e47980f4046fd3118008520fe70
---
 gnu/packages/golang-web.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 02c1262b0d..4d9f0c0882 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -914,11 +914,16 @@ for Go.")
     (arguments
      (list
       #:import-path "github.com/emersion/go-msgauth"
-      #:tests? #f ; Source-only package.
       #:phases
       #~(modify-phases %standard-phases
-          ;; Source-only package.
-          (delete 'build))))
+          ;; XXX: Run all tests, workaround for go-build-system's lack of Go
+          ;; modules support.
+          (delete 'build)
+          (replace 'check
+            (lambda* (#:key tests? import-path #:allow-other-keys)
+              (when tests?
+                (with-directory-excursion (string-append "src/" import-path)
+                  (invoke "go" "test" "-v" "./..."))))))))
     (propagated-inputs
      (list go-golang-org-x-crypto
            go-github-com-emersion-go-milter

Reply via email to