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

commit 1129b6fe4ab6faf2ae89093d0c8c92f66de5696b
Author: Sharlatan Hellseher <sharlata...@gmail.com>
AuthorDate: Thu Jul 25 22:47:08 2024 +0100

    gnu: yggdrasil: Enable tests.
    
    * gnu/packages/networking.scm (yggdrasil): Enable tests.
    [arguments]: <#:phases>: Use custom 'check phase.
    
    Change-Id: Ia2a59803508063a97993eae647a66335f5db3d06
---
 gnu/packages/networking.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 6aebdb0a54..b22a755396 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -4635,8 +4635,6 @@ QUIC protocol.")
     (build-system go-build-system)
     (arguments
      (list #:import-path "github.com/yggdrasil-network/yggdrasil-go"
-           ;; TODO: figure out how tests are run
-           #:tests? #f
            #:install-source? #f
            #:phases
            #~(modify-phases %standard-phases
@@ -4655,7 +4653,12 @@ QUIC protocol.")
                          #:import-path directory))
                       (list 
"github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasil"
                             
"github.com/yggdrasil-network/yggdrasil-go/cmd/yggdrasilctl"
-                            
"github.com/yggdrasil-network/yggdrasil-go/cmd/genkeys"))))))))
+                            
"github.com/yggdrasil-network/yggdrasil-go/cmd/genkeys")))))
+               (replace 'check
+                 (lambda* (#:key tests? import-path #:allow-other-keys)
+                   (when tests?
+                     (with-directory-excursion (string-append "src/" 
import-path)
+                       (invoke "go" "test" "-v" "./cmd/..." "./src/..."))))))))
     (propagated-inputs
      (list ;; go-golang-org-x-mobile ; Not packed yet, for contrib.
            ;; go-golang-zx2c4-com-wireguard-windows ; Not packed yet, for tun.

Reply via email to