~ruther/guix-local

120ad702e0bf6ad4c284a71f328fd87c273f2eda — Sharlatan Hellseher 1 year, 10 months ago 3ebb39e
gnu: go-github-com-quic-go-quic-go: Enable tests.

* gnu/packages/golang-web.scm (go-github-com-quic-go-quic-go): Enable tests.
[arguments] <#:phases>: Add 'remove-failing-tests. Use custom 'check
phase.
[propagated-inputs]: Remove go-github-com-cheekybits-genny,
go-github-com-golang-protobuf-proto,
go-github-com-marten-seemann-chacha20, and
go-github-com-quic-go-qtls-go1-20; add
go-github-com-francoispqt-gojay.
[native-inputs]: Add go-ginkgo, go-github-com-onsi-ginkgo-v2,
go-go-uber-org-mock, and go-golang-org-x-time.

Change-Id: I8bc03cbe1e9766188157e621f4d7f9e3a7f6adeb
1 files changed, 29 insertions(+), 7 deletions(-)

M gnu/packages/golang-web.scm
M gnu/packages/golang-web.scm => gnu/packages/golang-web.scm +29 -7
@@ 1997,16 1997,38 @@ the Go standard library}.")
    (build-system go-build-system)
    (arguments
     (list
      ;; XXX More packages required...
      #:tests? #f
      #:go go-1.21
      #:import-path "github.com/quic-go/quic-go"))
      #:import-path "github.com/quic-go/quic-go"
      #:phases
      #~(modify-phases %standard-phases
          ;; TODO: Figure out why some tests fail.
          (add-after 'unpack 'remove-failing-tests
            (lambda* (#:key import-path #:allow-other-keys)
              (with-directory-excursion (string-append "src/" import-path)
                (for-each delete-file
                          (list "integrationtests/self/timeout_test.go"
                                "server_test.go")))))
          ;; Test steps are taken from GitHub Actions -
          ;; <https://github.com/quic-go/quic-go/blob/v0.42.0/.github/workflows/unit.yml>.
          (replace 'check
            (lambda* (#:key tests? import-path #:allow-other-keys)
              (when tests?
                (with-directory-excursion (string-append "src/" import-path)
                  (invoke "ginkgo" "-r" "-v"
                          (string-append "--procs="
                                         (number->string (parallel-job-count)))
                          "--randomize-all"
                          "--randomize-suites"
                          "--skip-package"
                          "integrationtests"))))))))
    (native-inputs
     (list go-ginkgo
           go-github-com-onsi-ginkgo-v2
           go-go-uber-org-mock
           go-golang-org-x-time))
    (propagated-inputs
     (list go-github-com-cheekybits-genny
           go-github-com-golang-protobuf-proto
           go-github-com-marten-seemann-chacha20
     (list go-github-com-francoispqt-gojay
           go-github-com-quic-go-qpack
           go-github-com-quic-go-qtls-go1-20
           go-golang-org-x-crypto
           go-golang-org-x-exp
           go-golang-org-x-net