mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
Only test with -race on supported platforms (fixes #2765)
This commit is contained in:
parent
e11302172e
commit
54c1ffe5f3
11
build.go
11
build.go
@ -188,7 +188,18 @@ func setup() {
|
|||||||
|
|
||||||
func test(pkg string) {
|
func test(pkg string) {
|
||||||
setBuildEnv()
|
setBuildEnv()
|
||||||
|
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)
|
runPrint("go", "test", "-short", "-race", "-timeout", "60s", pkg)
|
||||||
|
} else {
|
||||||
|
runPrint("go", "test", "-short", "-timeout", "60s", pkg)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func bench(pkg string) {
|
func bench(pkg string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user