From ab25303a78b751d9fa6fb2e72c6950953eaa426b Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 12 Sep 2014 20:29:27 -0700 Subject: [PATCH] go.tools/go/loader: disable test case to fix build TBR=adonovan R=adonovan CC=golang-codereviews https://golang.org/cl/139650043 --- go/loader/stdlib_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/go/loader/stdlib_test.go b/go/loader/stdlib_test.go index e0277751..21a48b46 100644 --- a/go/loader/stdlib_test.go +++ b/go/loader/stdlib_test.go @@ -116,10 +116,14 @@ func TestStdlib(t *testing.T) { func TestCgoOption(t *testing.T) { switch runtime.GOOS { - // on these systems, the net and os/user packages don't use cgo. + // On these systems, the net and os/user packages don't use cgo. case "plan9", "solaris", "windows": return } + // For linux-amd64-nocgo, cgo is not used. + if runtime.GOOS == "linux" && runtime.GOARCH == "amd64" && !build.Default.CgoEnabled { + return + } // Test that we can load cgo-using packages with // CGO_ENABLED=[01], which causes go/build to select pure // Go/native implementations, respectively, based on build