From 671472c1c9e9d7bd61e0e7d94a4e7a72a3d3383e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 3 Mar 2015 15:50:32 -0800 Subject: [PATCH] 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 --- src/cmd/dist/test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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") -- 2.48.1