]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: only run -race test if -race works
authorIan Lance Taylor <iant@golang.org>
Mon, 5 Feb 2018 20:19:08 +0000 (12:19 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Mon, 5 Feb 2018 21:08:18 +0000 (21:08 +0000)
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>
src/cmd/go/go_test.go

index 9009ec92e13ca14e3ef44900aea1e688b5500926..7db62da34e076ad9631ac5202d835b312ecc2191 100644 (file)
@@ -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")
+       }
 }