mirror of
https://github.com/golang/go
synced 2024-11-19 20:14:43 -07:00
cmd/go: only run -race test if -race works
Updates #23694 Change-Id: I5fdad8cceacb8bbc85ca2661eb6482aa80343656 Reviewed-on: https://go-review.googlesource.com/92075 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
4558321eb2
commit
5952317637
@ -5696,6 +5696,8 @@ func TestAtomicCoverpkgAll(t *testing.T) {
|
||||
tg.tempFile("src/x/x.go", `package x; import _ "sync/atomic"; func F() {}`)
|
||||
tg.tempFile("src/x/x_test.go", `package x; import "testing"; func TestF(t *testing.T) { F() }`)
|
||||
tg.setenv("GOPATH", tg.path("."))
|
||||
tg.run("test", "-coverpkg=all", "-race", "x")
|
||||
tg.run("test", "-coverpkg=all", "-covermode=atomic", "x")
|
||||
if canRace {
|
||||
tg.run("test", "-coverpkg=all", "-race", "x")
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user