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
This commit is contained in:
Sharlatan Hellseher 2024-12-29 19:19:56 +00:00
parent f59b0d007a
commit bd3e2ba0be
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -3883,28 +3883,19 @@ (define-public go-github-com-koron-go-ssdp
(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")