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 <adg@golang.org>
This commit is contained in:
Brad Fitzpatrick 2015-03-03 15:50:32 -08:00
parent 848e2feac6
commit 671472c1c9
1 changed files with 6 additions and 6 deletions

12
src/cmd/dist/test.go vendored
View File

@ -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")