cmd/go: fix nocgo builder

Change-Id: I0f167d9769d9b6b9888c13fcb48e538fc87aa1b7
Reviewed-on: https://go-review.googlesource.com/12240
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Russ Cox 2015-07-15 01:16:47 -04:00
parent 47f22ab775
commit 5a4cc600b7
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import (
"bytes"
"flag"
"fmt"
"go/build"
"go/format"
"internal/testenv"
"io/ioutil"
@ -2106,6 +2107,10 @@ func TestGoTestRaceInstallCgo(t *testing.T) {
t.Skip("no race detector on %s", sys)
}
if !build.Default.CgoEnabled {
t.Skip("no race detector without cgo")
}
// golang.org/issue/10500.
// This used to install a race-enabled cgo.
tg := testgo(t)