1 :: Copyright 2013 The Go Authors. All rights reserved.
2 :: Use of this source code is governed by a BSD-style
3 :: license that can be found in the LICENSE file.
5 :: race.bash tests the standard library under the race detector.
6 :: https://golang.org/doc/articles/race_detector.html
12 if exist make.bat goto ok
13 echo race.bat must be run from go\src
14 :: cannot exit: would kill parent command interpreter
19 call make.bat --dist-tool >NUL
20 if errorlevel 1 goto fail
21 .\cmd\dist\dist.exe env -w -p >env.bat
22 if errorlevel 1 goto fail
26 if %GOHOSTARCH% == amd64 goto continue
27 echo Race detector is only supported on windows/amd64.
31 call make.bat --no-banner --no-local
32 if %GOBUILDFAIL%==1 goto end
33 echo # go install -race std
35 if errorlevel 1 goto fail
37 go tool dist test -race
39 if errorlevel 1 goto fail
48 echo All tests passed.
51 if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%