diff options
author | Ian Lance Taylor <iant@golang.org> | 2018-02-05 12:19:08 -0800 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-02-05 21:08:18 +0000 |
commit | 595231763754e5fc3a8431a31f3ae893fd7d2d57 (patch) | |
tree | 6fa8574b3ffe952bc19d87f9d07b68fd16c21625 | |
parent | 4558321eb2f412b39df515f508f831564af1c8fe (diff) | |
download | go-595231763754e5fc3a8431a31f3ae893fd7d2d57.tar.gz go-595231763754e5fc3a8431a31f3ae893fd7d2d57.zip |
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>
-rw-r--r-- | src/cmd/go/go_test.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 9009ec92e1..7db62da34e 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -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") + } } |