gnu: go: Disable time bomb tests for all versions.

* gnu/packages/golang.scm (go-1.21): Move 'skip-crypto-tls-tests phase
from here ...
(go-1.16, go-1.17): ... to here. This will fix the build of all
inherited Golang versions.

Change-Id: Iecf166dcd622800c54aa9357ff1aba6787ac49d1
This commit is contained in:
Sharlatan Hellseher 2025-01-21 23:58:49 +00:00
parent 3998babb63
commit 1b23d09bf6
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -288,6 +288,23 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(strip-keyword-arguments '(#:tests? #:system) (package-arguments go-1.4)) (strip-keyword-arguments '(#:tests? #:system) (package-arguments go-1.4))
((#:phases phases) ((#:phases phases)
`(modify-phases ,phases `(modify-phases ,phases
;; Time bomb in TLS tests: "Most of the test certificates
;; (e.g. testRSACertificate, testRSACertificateIssuer,
;; testRSA2048CertificateIssuer) have a not after of Jan 1
;; 00:00:00 2025 GMT."
;; https://github.com/golang/go/issues/71077
;; https://github.com/golang/go/issues/71103
;; https://github.com/golang/go/issues/71104
(add-after 'unpack 'skip-crypto-tls-tests
(lambda _
(substitute* (list "src/crypto/tls/handshake_client_test.go"
"src/crypto/tls/handshake_server_test.go")
(("TestVerifyConnection.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n"))
(("TestResumptionKeepsOCSPAndSCT.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n"))
(("TestCrossVersionResume.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n")))))
(add-after 'unpack 'remove-unused-sourcecode-generators (add-after 'unpack 'remove-unused-sourcecode-generators
(lambda _ (lambda _
;; Prevent perl from inclusion in closure through unused files ;; Prevent perl from inclusion in closure through unused files
@ -518,6 +535,25 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(setenv "GOROOT_FINAL" (string-append output "/lib/go")) (setenv "GOROOT_FINAL" (string-append output "/lib/go"))
(setenv "GOGC" "400") (setenv "GOGC" "400")
(setenv "GOCACHE" "/tmp/go-cache")))) (setenv "GOCACHE" "/tmp/go-cache"))))
;; Time bomb in TLS tests: "Most of the test certificates
;; (e.g. testRSACertificate, testRSACertificateIssuer,
;; testRSA2048CertificateIssuer) have a not after of Jan 1
;; 00:00:00 2025 GMT."
;; https://github.com/golang/go/issues/71077
;; https://github.com/golang/go/issues/71103
;; https://github.com/golang/go/issues/71104
(add-after 'unpack 'skip-crypto-tls-tests
(lambda _
(substitute* (list "src/crypto/tls/handshake_client_test.go"
"src/crypto/tls/handshake_server_test.go")
(("TestVerifyConnection.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n"))
(("TestResumptionKeepsOCSPAndSCT.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n"))
(("TestCrossVersionResume.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n")))))
(add-after 'unpack 'patch-source (add-after 'unpack 'patch-source
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((net-base (assoc-ref inputs "net-base")) (let* ((net-base (assoc-ref inputs "net-base"))
@ -841,24 +877,6 @@ in the style of communicating sequential processes (@dfn{CSP}).")
#~(modify-phases #$phases #~(modify-phases #$phases
(delete 'skip-TestGoPathShlibGccgo-tests) (delete 'skip-TestGoPathShlibGccgo-tests)
(delete 'patch-source) (delete 'patch-source)
;; Time bomb in TLS tests: "Most of the test certificates
;; (e.g. testRSACertificate, testRSACertificateIssuer,
;; testRSA2048CertificateIssuer) have a not after of Jan 1
;; 00:00:00 2025 GMT."
;; https://github.com/golang/go/issues/71077
;; https://github.com/golang/go/issues/71103
;; https://github.com/golang/go/issues/71104
(add-after 'unpack 'skip-crypto-tls-tests
(lambda _
(substitute* (list "src/crypto/tls/handshake_client_test.go"
"src/crypto/tls/handshake_server_test.go")
(("TestVerifyConnection.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n"))
(("TestResumptionKeepsOCSPAndSCT.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n"))
(("TestCrossVersionResume.*" all)
(string-append all "\n t.Skip(\"golang.org/issue/71077\")\n")))))
(add-after 'unpack 'patch-os-tests (add-after 'unpack 'patch-os-tests
(lambda _ (lambda _
(substitute* "src/os/os_test.go" (substitute* "src/os/os_test.go"