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