While gocheckflags exists, it gets passed to go-rpm-integration, but ignored after that. For example, if I add:
gocheckflags
go-rpm-integration
%global gocheckflags -timeout 30m
then it appears when go-rpm-integration is called:
+ go-rpm-integration check -i go.etcd.io/bbolt -b /builddir/build/BUILD/bbolt-1.3.3/_build/bin -s /builddir/build/BUILD/bbolt-1.3.3/_build -V 1.3.3-1.fc31 -p /builddir/build/BUILDROOT/golang-etcd-bbolt-1.3.3-1.fc31.x86_64 -g /usr/share/gocode -timeout 30m -v Testing in: /builddir/build/BUILD/bbolt-1.3.3/_build/src PATH: /builddir/build/BUILD/bbolt-1.3.3/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin GOPATH: /builddir/build/BUILD/bbolt-1.3.3/_build:/usr/share/gocode GO111MODULE: off command: go test -buildmode pie -compiler gc -ldflags "-X go.etcd.io/bbolt/version=1.3.3 -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" testing: go.etcd.io/bbolt
but it's not there in the command: go test ....
command: go test ...
I also tried export GO_TEST_FLAGS="-timeout 30m", but this gets overwritten by something else.
export GO_TEST_FLAGS="-timeout 30m"
gocheckflags is here to pass exclusion information to go-rpm-integration in gocheck, the same way goinstallflags works in goinstall.
gocheck
goinstallflags
goinstall
To pass information explicitely to the go test layer, you need gotestflags.
go test
gotestflags
Be careful because this variable is already set by the macro parts inherited from go-compilers, add to it do not overwrite it.
go-compilers
The whole logic is here: https://pagure.io/go-rpm-macros/blob/master/f/rpm/macros.d/macros.go-rpm#_352
OK, this seems like it works:
%global gotestflags %{gotestflags} -timeout 30m
I guess something like this needs to be mentioned in the templates at least.
Login to comment on this ticket.