From: Brad Fitzpatrick Date: Tue, 3 Mar 2015 23:50:32 +0000 (-0800) Subject: build: don't run a cgo test when cgo is disabled X-Git-Tag: go1.5beta1~1730 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=671472c1c9e9d7bd61e0e7d94a4e7a72a3d3383e;p=gostls13.git build: don't run a cgo test when cgo is disabled Fixes the linux-amd64-nocgo builder. Regression from https://golang.org/cl/6531 Change-Id: Ibffd1ecfee4a888605ed54196f53956ae42e591c Reviewed-on: https://go-review.googlesource.com/6700 Reviewed-by: Andrew Gerrand --- diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 1817837587..555855edae 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -287,12 +287,12 @@ func (t *tester) registerTests() { } else if t.hasBash() { t.registerTest("testso", "../misc/cgo/testso", "./test.bash") } - } - if t.gohostos == "linux" && t.goarch == "amd64" { - t.registerTest("testasan", "../misc/cgo/testasan", "go", "run", "main.go") - } - if t.hasBash() && cgo && t.gohostos != "windows" { - t.registerTest("cgo_errors", "../misc/cgo/errors", "./test.bash") + if t.gohostos == "linux" && t.goarch == "amd64" { + t.registerTest("testasan", "../misc/cgo/testasan", "go", "run", "main.go") + } + if t.hasBash() && t.gohostos != "windows" { + t.registerTest("cgo_errors", "../misc/cgo/errors", "./test.bash") + } } if t.hasBash() && t.goos != "nacl" && t.goos != "android" { t.registerTest("doc_progs", "../doc/progs", "time", "./run")