diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-08-09 21:45:43 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-08-11 13:15:39 +0100 |
commit | b313bdc7e739244d88994976fcc2954d4ba10d49 (patch) | |
tree | d274358e6b17f0dc8b0f0858d97b4e8c6b1e1e0b | |
parent | b6332821c211a6e788d5a9ff576b56e0e4038aaa (diff) | |
download | guix-b313bdc7e739244d88994976fcc2954d4ba10d49.tar.gz guix-b313bdc7e739244d88994976fcc2954d4ba10d49.zip |
gnu: go-github-com-rogpeppe-go-internal: Enable tests.
* gnu/packages/golang-xyz.scm (go-github-com-rogpeppe-go-internal):
Enable tests.
[arguments]: <#:phases>: Add 'disable-failing-tests phase; use custom
'check phase.
[propagated-inputs]: Remove go-github-com-pkg-diff; add go-golang-org-x-mod,
go-golang-org-x-sys, and go-golang-org-x-tools.
Change-Id: Ia937113bd690cee9d954c0b5b53b6067f8e447ba
-rw-r--r-- | gnu/packages/golang-xyz.scm | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 26fdf7671f..2aa86d5bb1 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -4752,18 +4752,30 @@ not overload the given database.") (arguments (list #:import-path "github.com/rogpeppe/go-internal" - ;; Source-only package - #:tests? #f #:phases #~(modify-phases %standard-phases - (delete 'build)))) + (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$") + (("TestSimple") "OffTestSimple"))))) + ;; XXX: Replace when go-build-system supports nested path. + (delete 'build) + (replace 'check + (lambda* (#:key import-path tests? #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" import-path) + (invoke "go" "test" "-v" "./...")))))))) (propagated-inputs - (list go-github-com-pkg-diff)) + (list go-golang-org-x-mod + go-golang-org-x-sys + go-golang-org-x-tools)) (home-page "https://github.com/rogpeppe/go-internal/") (synopsis "Internal packages from the Go standard library") - (description "This repository factors out an opinionated selection of -internal packages and functionality from the Go standard library. Currently -this consists mostly of packages and testing code from within the Go tool + (description + "This repository factors out an opinionated selection of internal +packages and functionality from the Go standard library. Currently this +consists mostly of packages and testing code from within the Go tool implementation. Included are the following: |