]> Cypherpunks.ru repositories - gostls13.git/blob - src/race.bat
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / src / race.bat
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
4 \r
5 :: race.bash tests the standard library under the race detector.\r
6 :: https://golang.org/doc/articles/race_detector.html\r
7 \r
8 @echo off\r
9 \r
10 setlocal\r
11 \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
15 goto end\r
16 :ok\r
17 \r
18 set GOROOT=%CD%\..\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
23 call .\env.bat\r
24 del env.bat\r
25 \r
26 if %GOHOSTARCH% == amd64 goto continue\r
27 echo Race detector is only supported on windows/amd64.\r
28 goto fail\r
29 \r
30 :continue\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
36 \r
37 go tool dist test -race\r
38 \r
39 if errorlevel 1 goto fail\r
40 goto succ\r
41 \r
42 :fail\r
43 set GOBUILDFAIL=1\r
44 echo Fail.\r
45 goto end\r
46 \r
47 :succ\r
48 echo All tests passed.\r
49 \r
50 :end\r
51 if x%GOBUILDEXIT%==x1 exit %GOBUILDFAIL%\r