diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-07-12 16:03:55 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-07-15 12:17:50 +0100 |
commit | 86334801d3654eb90a73f4e5d615976c5821f79b (patch) | |
tree | d55b2e0b739d6bf8fabb535df10f97c113f00e92 | |
parent | ced3ded8298af5b23f47537726e2c6c5595492f1 (diff) | |
download | guix-86334801d3654eb90a73f4e5d615976c5821f79b.tar.gz guix-86334801d3654eb90a73f4e5d615976c5821f79b.zip |
gnu: go-golang-org-x-tools: Enable most of the tests.
* gnu/packages/golang-build.scm (go-golang-org-x-tools): Adjust package style.
[arguments]: <#:phases>: Use custom 'check phase.
[native-inputs]: Add gccgo-14.
Change-Id: If1245d0e3787ded7a783b89de251f2a65ff00917
-rw-r--r-- | gnu/packages/golang-build.scm | 62 |
1 files changed, 52 insertions, 10 deletions
diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm index 6abcfee442..b7e44e9203 100644 --- a/gnu/packages/golang-build.scm +++ b/gnu/packages/golang-build.scm @@ -40,7 +40,8 @@ #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) - #:use-module (gnu packages)) + #:use-module (gnu packages) + #:use-module (gnu packages gcc)) ;;; Commentary: ;;; @@ -587,21 +588,62 @@ time.") (delete-file-recursively "gopls"))))) (build-system go-build-system) (arguments - `(#:import-path "golang.org/x/tools" - ;; Source-only package - #:tests? #f - #:phases - (modify-phases %standard-phases - ;; Source-only package - (delete 'build)))) + (list + #:import-path "golang.org/x/tools" + #:phases + #~(modify-phases %standard-phases + ;; XXX: Workaround for go-build-system's lack of Go modules + ;; support. + (delete 'build) + (replace 'check + (lambda* (#:key tests? import-path #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" import-path) + (invoke "go" "test" "-v" + ;; TODO: They contain final project executable builds, + ;; would be packed separately. + ;; - cmd + ;; - godoc + + ;; FIXME: Figure out why they are failing: + ;; "./internal/..." + ;; "./present/..." + ;; "./refactor/eg/..." + ;; "./go/ssa/..." + ;; "./go/packages/..." + ;; "./go/analysis/..." + + "./blog/..." ; + "./container/..." + "./copyright/..." + "./cover/..." + "./go/ast/..." + "./go/buildutil/..." + "./go/callgraph/..." + "./go/cfg/..." + "./go/expect/..." + "./go/gccgoexportdata/..." + "./go/gcexportdata/..." + "./go/internal/..." + "./go/loader/..." + "./go/types/..." + "./imports/..." + "./playground/..." + "./refactor/importgraph/..." + "./refactor/rename/..." + "./refactor/satisfy/..." + "./txtar/...")))))))) + (native-inputs + (list gccgo-14)) (propagated-inputs (list go-github-com-yuin-goldmark go-golang-org-x-mod go-golang-org-x-net - go-golang-org-x-sys)) + go-golang-org-x-sync)) (home-page "https://go.googlesource.com/tools/") (synopsis "Tools that support the Go programming language") - (description "This package provides miscellaneous tools that support the + (description + "This package provides miscellaneous tools that support the Go programming language.") (license license:bsd-3))) |