aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-07-24 21:29:01 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-07-25 21:01:02 +0100
commit9d637f7fdbfa5910fd176cac01a4491fd833f480 (patch)
tree2e8c0f39675493715e80f99665fcb13727f31cf0 /gnu/packages
parent27a387a1522ce35a4f863982c9dfa369f84fff43 (diff)
downloadguix-9d637f7fdbfa5910fd176cac01a4491fd833f480.tar
guix-9d637f7fdbfa5910fd176cac01a4491fd833f480.tar.gz
gnu: go-github-com-prometheus-common: Enable tests.
* gnu/packages/golang.scm (go-github-com-prometheus-common): Enable the most of the tests. [arguments]: <#:phases>: Use custom 'check phase. Change-Id: I4190be63393cbba4d2e132bab21d40625a022141
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/golang.scm26
1 files changed, 20 insertions, 6 deletions
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index d60ae45722..57b15435df 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7374,12 +7374,26 @@ formatting information, rather than the current locale name.")
(list "assets" "sigv4"))))))
(build-system go-build-system)
(arguments
- '(#:import-path "github.com/prometheus/common"
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- ;; Source-only package
- (delete 'build))))
+ (list
+ #:import-path "github.com/prometheus/common"
+ #: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"
+ ;; "./config/..." requries
+ ;; <github.com/prometheus/client_golang/prometheus>,
+ ;; which introduce cycle.
+ "./expfmt/..."
+ "./helpers/..."
+ "./model/..."
+ "./promlog/..."
+ "./route/..."
+ "./server/..."))))))))
(native-inputs
(list go-github-com-stretchr-testify))
(propagated-inputs