In go, I can enable the race detector for tests using the -race
option e.g.
go test -race ./foo/bar
How do I do this in bazel?
As of https://github.com/bazelbuild/rules_go/pull/635, you can run bazel tests using the option --features race
to provide the -race
flag to go tests. e.g.
bazel test --features race //src/foo/bar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With