diff options
author | Troy Figiel <troy@troyfigiel.com> | 2024-02-25 10:06:52 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-11-09 21:33:39 +0000 |
commit | 56cc37bfb2d6eff76a01e499d4adf17b69a88fe3 (patch) | |
tree | 5d90ef16848f225dcd18f41519a1ea44425e88ad /doc | |
parent | 7f6a9ecaa3846c710e416a3fa16daf11e2a31c1c (diff) |
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 'doc')
-rw-r--r-- | doc/guix.texi | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 151fcd89ac..789e153189 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9582,6 +9582,12 @@ in their documentation}. The key @code{#:go} can be used to specify the Go compiler package with which to build the package. +The phase @code{check} provides a wrapper for @code{go test} which +builds a test binary (or multiple binaries), vets the code and then runs +the test binary. Build, test and test binary flags can be provided as +@code{#:test-flags} parameter, default is @code{'()}. See @code{go help +test} and @code{go help testflag} for more details. + @end defvar @defvar glib-or-gtk-build-system |