![](/img/trans.png)
[英]How do I run go test with the -msan option on Ubuntu 18.04?
[英]How do I run a go test using bazel with the -race option?
在 go 中,我可以使用-race
选项启用竞态检测器进行测试,例如
go test -race./foo/bar
我如何在巴泽尔中做到这一点?
从https://github.com/bazelbuild/rules_go/pull/635 开始,您可以使用选项--features race
运行 bazel 测试,为 go 测试提供-race
标志。 例如
bazel test --features race //src/foo/bar
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.