]> Cypherpunks.ru repositories - gostls13.git/blob - src/run.bat
run.bat: do not unset GOROOT_FINAL before running tests
[gostls13.git] / src / run.bat
1 :: Copyright 2012 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 @echo off\r
6 \r
7 if exist ..\bin\go.exe goto ok\r
8 echo Must run run.bat from Go src directory after installing cmd/go.\r
9 goto fail\r
10 :ok\r
11 \r
12 :: Keep environment variables within this script\r
13 :: unless invoked with --no-local.\r
14 if x%1==x--no-local goto nolocal\r
15 if x%2==x--no-local goto nolocal\r
16 setlocal\r
17 :nolocal\r
18 \r
19 set GOBUILDFAIL=0\r
20 \r
21 :: we disallow local import for non-local packages, if %GOROOT% happens\r
22 :: to be under %GOPATH%, then some tests below will fail\r
23 set GOPATH=\r
24 :: Issue 14340: ignore GOBIN during all.bat.\r
25 set GOBIN=\r
26 set GOFLAGS=\r
27 set GO111MODULE=\r
28 \r
29 rem TODO avoid rebuild if possible\r
30 \r
31 if x%1==x--no-rebuild goto norebuild\r
32 echo ##### Building packages and commands.\r
33 ..\bin\go install -a -v std cmd\r
34 if errorlevel 1 goto fail\r
35 echo.\r
36 :norebuild\r
37 \r
38 :: get CGO_ENABLED\r
39 ..\bin\go env > env.bat\r
40 if errorlevel 1 goto fail\r
41 call env.bat\r
42 del env.bat\r
43 echo.\r
44 \r
45 ..\bin\go tool dist test\r
46 if errorlevel 1 goto fail\r
47 echo.\r
48 \r
49 goto end\r
50 \r
51 :fail\r
52 set GOBUILDFAIL=1\r
53 \r
54 :end\r