Only test with -race on supported platforms (fixes #2765)

This commit is contained in:
Jakob Borg 2016-02-15 11:33:24 +01:00
parent e11302172e
commit 54c1ffe5f3
1 changed files with 12 additions and 1 deletions

View File

@ -188,7 +188,18 @@ func setup() {
func test(pkg string) {
setBuildEnv()
runPrint("go", "test", "-short", "-race", "-timeout", "60s", pkg)
useRace := runtime.GOARCH == "amd64"
switch runtime.GOOS {
case "darwin", "linux", "freebsd", "windows":
default:
useRace = false
}
if useRace {
runPrint("go", "test", "-short", "-race", "-timeout", "60s", pkg)
} else {
runPrint("go", "test", "-short", "-timeout", "60s", pkg)
}
}
func bench(pkg string) {