aboutsummaryrefslogtreecommitdiff
path: root/guix/build-system/go.scm
diff options
context:
space:
mode:
authorTroy Figiel <troy@troyfigiel.com>2024-02-25 10:06:52 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-11-09 21:33:39 +0000
commit56cc37bfb2d6eff76a01e499d4adf17b69a88fe3 (patch)
tree5d90ef16848f225dcd18f41519a1ea44425e88ad /guix/build-system/go.scm
parent7f6a9ecaa3846c710e416a3fa16daf11e2a31c1c (diff)
downloadguix-56cc37bfb2d6eff76a01e499d4adf17b69a88fe3.tar.gz
guix-56cc37bfb2d6eff76a01e499d4adf17b69a88fe3.zip
build-system/go: Allow providing additional test flags.
By allowing the use of test flags, we can more precisely skip failing tests (for go version >=1.20), disable the vetting stage or select a subset of tests (e.g. if an upstream flag is provided to skip tests which require a network connection). At the moment, the only way around these test failures is to remove the test file completely or patch the code ourselves. * guix/build-system/go.scm (go-build): Add test-flags variable. (go-cross-build): Add test-flags variable. * guix/build/go-build-system.scm (check): Pass the additional test flags to the invoke call. * doc/guix.texi (go-build-system): Document <#:test-flags> parameter. Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com> Change-Id: I4015870fbbc15503cb405fe9ef6032953a5ff17f
Diffstat (limited to 'guix/build-system/go.scm')
-rw-r--r--guix/build-system/go.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 226688f2d2..f4231df4ec 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -192,6 +192,7 @@ commit hash and its date rather than a proper release tag."
(unpack-path "")
(build-flags ''())
(tests? #t)
+ (test-flags ''())
(parallel-build? #t)
(parallel-tests? #t)
(allow-go-reference? #f)
@@ -224,6 +225,7 @@ commit hash and its date rather than a proper release tag."
#:unpack-path #$unpack-path
#:build-flags #$build-flags
#:tests? #$tests?
+ #:test-flags #$test-flags
#:parallel-build? #$parallel-build?
#:parallel-tests? #$parallel-tests?
#:allow-go-reference? #$allow-go-reference?
@@ -248,6 +250,7 @@ commit hash and its date rather than a proper release tag."
(unpack-path "")
(build-flags ''())
(tests? #f) ; nothing can be done
+ (test-flags ''())
(allow-go-reference? #f)
(system (%current-system))
(goarch (first (go-target target)))
@@ -297,6 +300,7 @@ commit hash and its date rather than a proper release tag."
#:unpack-path #$unpack-path
#:build-flags #$build-flags
#:tests? #$tests?
+ #:test-flags #$test-flags
#:make-dynamic-linker-cache? #f ;cross-compiling
#:allow-go-reference? #$allow-go-reference?
#:inputs %build-inputs))))