aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-07-19 22:18:22 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-07-25 21:00:58 +0100
commitbdff9d26423a62f246882a46c5440c144c54910c (patch)
treebc772f50121f26e84c14254bda5c5d4e9078421e
parent770a66850530df05c967b8ce47109843cd343a64 (diff)
downloadguix-bdff9d26423a62f246882a46c5440c144c54910c.tar
guix-bdff9d26423a62f246882a46c5440c144c54910c.tar.gz
gnu: go-github-com-google-go-cmp-cmp: Enable all tests.
* gnu/packages/golang.scm (go-github-com-google-go-cmp-cmp) [arguments]: <#:phases>: Adjust custom 'check phase to run all available tests inside each submodule and respect "tests?' parameter. Change-Id: I85eacbb4c3221d34a2e7cf6a9f6cfde363ded71c
-rw-r--r--gnu/packages/golang.scm16
1 files changed, 11 insertions, 5 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index a5d199df2c..6bc9b3a6d5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5950,11 +5950,17 @@ filters for Go.")
#:phases
#~(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key inputs #:allow-other-keys #:rest args)
- (unless
- ;; The tests fail when run with gccgo.
- (false-if-exception (search-input-file inputs "/bin/gccgo"))
- (apply (assoc-ref %standard-phases 'check) args)))))))
+ (lambda* (#:key tests? import-path inputs #:allow-other-keys)
+ (when tests?
+ ;; The tests fail when run with gccgo.
+ (let ((gccgo? (false-if-exception
+ (search-input-file inputs "/bin/gccgo"))))
+ (if gccgo?
+ (format #t "skipping tests with gccgo compiler~%")
+ ;; XXX: Workaround for go-build-system's lack of Go
+ ;; modules support.
+ (with-directory-excursion (string-append "src/" import-path)
+ (invoke "go" "test" "-v" "./..."))))))))))
(synopsis "Determine equality of values in Go")
(home-page "https://github.com/google/go-cmp")
(description