diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-20 00:06:31 +0000 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-01-21 23:42:11 +0000 |
commit | 54760c3c52659f4b32c82d767d38a41a99e8a821 (patch) | |
tree | 8ad1cc4a2616497dbdc727a1398b7edaf0a901d2 | |
parent | 73979b7e764cd9e2b3d1b69a86c7f1ce32f37fc4 (diff) |
gnu: go-golang-org-x-exp: Simplify.
* gnu/packages/golang-build.scm (go-golang-org-x-exp):
[arguments] <skip-build?>: Set to #t, as no go files in project's root.
<test-flags>: Skip 2 tests.
<phases>: Remove 'remove-failing-tests, add 'remove-benchmarks, use
default 'check.
Change-Id: I65dce027be23e2f987a15f7dbc35cbdd3edcb45b
-rw-r--r-- | gnu/packages/golang-build.scm | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm index 4b6ef9fb53..f5d16d4e63 100644 --- a/gnu/packages/golang-build.scm +++ b/gnu/packages/golang-build.scm @@ -499,29 +499,21 @@ language.") (build-system go-build-system) (arguments (list + #:skip-build? #t #:import-path "golang.org/x/exp" + #:test-flags + ;; Disable failing tests: error running `go mod init`: go: + ;; modules disabled by GO111MODULE=off. + #~(list "-skip" (string-join + (list "TestRelease_gitRepo_uncommittedChanges" + "TestFailure") + "|")) #:phases #~(modify-phases %standard-phases - (add-after 'unpack 'remove-failing-tests + (add-after 'unpack 'remove-benchmarks (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" "./...")))))))) + (delete-file-recursively "slog/benchmarks"))))))) (propagated-inputs (list go-github-com-google-go-cmp go-golang-org-x-mod |