]> Cypherpunks repositories - gostls13.git/commitdiff
build: don't run a cgo test when cgo is disabled
authorBrad Fitzpatrick <bradfitz@golang.org>
Tue, 3 Mar 2015 23:50:32 +0000 (15:50 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 4 Mar 2015 00:25:25 +0000 (00:25 +0000)
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>
src/cmd/dist/test.go

index 181783758764b42186c2ba86c117ce108d3c4721..555855edae6277796d45664eb231f2ed7b238171 100644 (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")