]> Cypherpunks.ru repositories - gostls13.git/blob - src/run.bat
build: use setlocal in run.bat
[gostls13.git] / src / run.bat
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.
4 @echo off
5
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
10 setlocal
11 :nolocal
12
13 set GOBUILDFAIL=0
14
15 rem TODO avoid rebuild if possible
16
17 if x%1==x--no-rebuild goto norebuild
18 echo # Building packages and commands.
19 go install -a -v std
20 if errorlevel 1 goto fail
21 echo .
22 :norebuild
23
24 echo # Testing packages.
25 go test std -short -timeout=120s
26 if errorlevel 1 goto fail
27 echo .
28
29 echo # runtime -cpu=1,2,4
30 go test runtime -short -timeout=120s -cpu=1,2,4
31 if errorlevel 1 goto fail
32 echo .
33
34 echo # sync -cpu=10
35 go test sync -short -timeout=120s -cpu=10
36 if errorlevel 1 goto fail
37 echo .
38
39 :: TODO: The other tests in run.bash, especially $GOROOT/test/run.
40
41 echo ALL TESTS PASSED
42 goto end
43
44 :fail
45 set GOBUILDFAIL=1
46
47 :end