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