| :: Copyright 2012 The Go Authors. All rights reserved. |
| :: Use of this source code is governed by a BSD-style |
| :: license that can be found in the LICENSE file. |
| :: Keep environment variables within this script |
| :: unless invoked with --no-local. |
| if x%1==x--no-local goto nolocal |
| if x%2==x--no-local goto nolocal |
| :: we disallow local import for non-local packages, if %GOROOT% happens |
| :: to be under %GOPATH%, then some tests below will fail |
| rem TODO avoid rebuild if possible |
| if x%1==x--no-rebuild goto norebuild |
| echo ##### Building packages and commands. |
| if errorlevel 1 goto fail |
| :: we must unset GOROOT_FINAL before tests, because runtime/debug requires |
| :: correct access to source code, so if we have GOROOT_FINAL in effect, |
| :: at least runtime/debug test will fail. |
| if errorlevel 1 goto fail |
| if errorlevel 1 goto fail |