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.
6 :: Keep environment variables within this script
7 :: unless invoked with --no-local.
8 if x%1==x--no-local goto nolocal
9 if x%2==x--no-local goto nolocal
15 :: we disallow local import for non-local packages, if %GOROOT% happens
16 :: to be under %GOPATH%, then some tests below will fail
19 rem TODO avoid rebuild if possible
21 if x%1==x--no-rebuild goto norebuild
22 echo # Building packages and commands.
24 if errorlevel 1 goto fail
28 :: we must unset GOROOT_FINAL before tests, because runtime/debug requires
29 :: correct access to source code, so if we have GOROOT_FINAL in effect,
30 :: at least runtime/debug test will fail.
33 echo # Testing packages.
34 go test std -short -timeout=120s
35 if errorlevel 1 goto fail
38 echo # runtime -cpu=1,2,4
39 go test runtime -short -timeout=120s -cpu=1,2,4
40 if errorlevel 1 goto fail
44 go test sync -short -timeout=120s -cpu=10
45 if errorlevel 1 goto fail
48 echo # ..\misc\dashboard\builder ..\misc\goplay
49 go build ..\misc\dashboard\builder ..\misc\goplay
50 if errorlevel 1 goto fail
53 :: TODO(brainman): disabled, because it fails with: mkdir C:\Users\ADMINI~1\AppData\Local\Temp\2.....\test\bench\: The filename or extension is too long.
54 ::echo # ..\test\bench\go1
55 ::go test ..\test\bench\go1
56 ::if errorlevel 1 goto fail
59 :: TODO: The other tests in run.bash.
65 if errorlevel 1 set FAIL=1
68 if %FAIL%==1 goto fail
70 echo # Checking API compatibility.
71 go tool api -c ..\api\go1.txt -next ..\api\next.txt
72 if errorlevel 1 goto fail