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

commit 55426926c489fd002ee05165eaea76a00c20a724
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Sun Dec 29 19:19:56 2024 +0000

    gnu: go-github-com-koron-go-ssdp: Simplify.
    
    * gnu/packages/golang-web.scm (go-github-com-koron-go-ssdp): Simplify.
    [arguments] <test-flags>: Move test skip logic here.
    <phases>: Use default 'check.
    
    Change-Id: I4bcba4e387f7d74f11c812dbe49ef4b9a94a31bd
---
 gnu/packages/golang-web.scm | 35 +++++++++++++----------------------
 1 file changed, 13 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index b59f215019..cf9da3312e 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -3883,28 +3883,19 @@ router.")
     (arguments
      (list
       #:import-path "github.com/koron/go-ssdp"
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'disable-failing-tests
-            (lambda* (#:key tests? import-path #:allow-other-keys)
-              (with-directory-excursion (string-append "src/" import-path)
-                (substitute* (find-files "." "\\_test.go$")
-                  ;; Test requiring network setup.
-                  (("TestAdvertise_Alive") "OffTestAdvertise_Alive")
-                  (("TestAdvertise_Bye") "OffTestAdvertise_Bye")
-                  (("TestAnnounceAlive") "OffTestAnnounceAlive")
-                  (("TestAnnounceBye") "OffTestAnnounceBye")
-                  (("TestInterfaces") "OffTestInterfaces")
-                  (("TestSearch_Request") "OffTestSearch_Request")
-                  (("TestSearch_Response") "OffTestSearch_Response")
-                  (("TestSearch_ServiceRawHeader") 
"OffTestSearch_ServiceRawHeader")))))
-          ;; XXX: Run all tests, workaround for go-build-system's lack of Go
-          ;; modules support.
-          (replace 'check
-            (lambda* (#:key tests? import-path #:allow-other-keys)
-              (when tests?
-                (with-directory-excursion (string-append "src/" import-path)
-                  (invoke "go" "test" "-v" "./..."))))))))
+      #:test-flags
+      #~(list "-skip"
+              (string-join
+               ;; Tests requiring network setup.
+               (list "TestAdvertise_Alive"
+                     "TestAdvertise_Bye"
+                     "TestAnnounceAlive"
+                     "TestAnnounceBye"
+                     "TestInterfaces"
+                     "TestSearch_Request"
+                     "TestSearch_Response"
+                     "TestSearch_ServiceRawHeader")
+               "|"))))
     (propagated-inputs
      (list go-golang-org-x-net))
     (home-page "https://github.com/koron/go-ssdp";)

Reply via email to