1 :: Copyright 2012 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.
7 if exist ..\bin\go goto ok
8 echo Must run run.bat from Go src directory after installing cmd/go.
12 :: Keep environment variables within this script
13 :: unless invoked with --no-local.
14 if x%1==x--no-local goto nolocal
15 if x%2==x--no-local goto nolocal
21 :: we disallow local import for non-local packages, if %GOROOT% happens
22 :: to be under %GOPATH%, then some tests below will fail
24 :: Issue 14340: ignore GOBIN during all.bat.
29 rem TODO avoid rebuild if possible
31 if x%1==x--no-rebuild goto norebuild
32 echo ##### Building packages and commands.
33 go install -a -v std cmd
34 if errorlevel 1 goto fail
38 :: we must unset GOROOT_FINAL before tests, because runtime/debug requires
39 :: correct access to source code, so if we have GOROOT_FINAL in effect,
40 :: at least runtime/debug test will fail.
44 ..\bin\go env > env.bat
45 if errorlevel 1 goto fail
50 ..\bin\go tool dist test
51 if errorlevel 1 goto fail