go.tools/go/loader: disable test case to fix build

TBR=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/139650043
This commit is contained in:
Robert Griesemer 2014-09-12 20:29:27 -07:00
parent f04d2c5c34
commit ab25303a78
1 changed files with 5 additions and 1 deletions

View File

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