mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-17 00:18:16 -05:00
gnu: go-golang-org-x-exp: Enable tests.
* gnu/packages/golang-build.scm (go-golang-org-x-exp): Enable tests. [arguments]: <#:phases>: Add 'remove-failing-tests phase. Use custom 'check phase. [propagated-inputs]: Add go-github-com-google-go-cmp, go-golang-org-x-mod, and go-golang-org-x-tools. Change-Id: Ic1573969572d32bb7318ed73135c853f42338f86
This commit is contained in:
parent
96998167c2
commit
4714623e05
1 changed files with 26 additions and 4 deletions
|
@ -277,10 +277,32 @@ (define-public go-golang-org-x-exp
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:import-path "golang.org/x/exp"
|
#:import-path "golang.org/x/exp"
|
||||||
;; Source-only package
|
#:phases
|
||||||
#:tests? #f
|
#~(modify-phases %standard-phases
|
||||||
#:phases #~(modify-phases %standard-phases
|
(add-after 'unpack 'remove-failing-tests
|
||||||
(delete 'build))))
|
(lambda* (#:key import-path #:allow-other-keys)
|
||||||
|
(with-directory-excursion (string-append "src/" import-path)
|
||||||
|
;; Benchmark requires other modules to pass tests, delete them.
|
||||||
|
(delete-file-recursively "slog/benchmarks")
|
||||||
|
(substitute* (find-files "." "\\_test.go$")
|
||||||
|
;; Disable failing tests: error running `go mod init`: go:
|
||||||
|
;; modules disabled by GO111MODULE=off; see 'go help modules'
|
||||||
|
;; , exit status 1
|
||||||
|
(("TestFailure") "OffTestFailure")
|
||||||
|
(("TestRelease_gitRepo_uncommittedChanges")
|
||||||
|
"OffTestRelease_gitRepo_uncommittedChanges")))))
|
||||||
|
;; 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" "./..."))))))))
|
||||||
|
(propagated-inputs
|
||||||
|
(list go-github-com-google-go-cmp
|
||||||
|
go-golang-org-x-mod
|
||||||
|
go-golang-org-x-tools))
|
||||||
(home-page "https://golang.org/x/exp")
|
(home-page "https://golang.org/x/exp")
|
||||||
(synopsis "Experimental and deprecated Go packages")
|
(synopsis "Experimental and deprecated Go packages")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in a new issue