Closed lucacome closed 3 months ago
ginkgo build
is just using go test -c
under the hood. is there a flag it should be passing that it isn't?
You need to add -buildvcs=true
Looks like there's a bug in go
(https://github.com/golang/go/issues/33976) and the package needs to be called main
, that's why there wasn't any information at all for me, now I have:
❯ go version -m suite/suite.test
suite/suite.test: go1.22.5
path github.com/nginxinc/nginx-gateway-fabric/tests/suite
mod github.com/nginxinc/nginx-gateway-fabric/tests (devel)
build -buildmode=exe
build -compiler=gc
build CGO_ENABLED=1
build CGO_CFLAGS=
build CGO_CPPFLAGS=
build CGO_CXXFLAGS=
build CGO_LDFLAGS=
build GOARCH=arm64
build GOOS=darwin
but yeah it's still missing the vcs info.
I confirmed that adding -buildvcs=true
to ginkgo
will add that info. I might try to open a PR.
I'd like to be able to read build information from the code. Since go
1.18
it's possible to getvcs
data withruntime/debug
, see https://pkg.go.dev/runtime/debug#BuildSettingBut the suite doesn't seem to contain any data
As an example