LEFT | RIGHT |
1 #!/bin/rc -e | 1 #!/bin/rc -e |
2 # Copyright 2012 The Go Authors. All rights reserved. | 2 # Copyright 2012 The Go Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style | 3 # Use of this source code is governed by a BSD-style |
4 # license that can be found in the LICENSE file. | 4 # license that can be found in the LICENSE file. |
5 | 5 |
6 if(! test -f make.rc){ | 6 eval `{go env -9} |
7 » echo 'all.rc must be run from $GOROOT/src' >[1=2] | |
8 » exit wrongdir | |
9 } | |
10 | 7 |
| 8 # allow all.rc to avoid double-build of everything |
11 rebuild = true | 9 rebuild = true |
12 if(~ $1 --no-rebuild) | 10 if(~ $1 --no-rebuild) |
13 shift | 11 shift |
14 if not { | 12 if not { |
15 echo '# Building packages and commands.' | 13 echo '# Building packages and commands.' |
16 time go install -a -v -p 1 std | 14 time go install -a -v -p 1 std |
17 echo | 15 echo |
18 } | 16 } |
19 | 17 |
20 echo '# Testing packages.' | 18 echo '# Testing packages.' |
21 time go test std -short -timeout'='120s | 19 time go test std -short -timeout 120s |
22 echo | 20 echo |
23 | 21 |
24 echo '# runtime -cpu=1,2,4' | 22 echo '# GOMAXPROCS=2 runtime -cpu=1,2,4' |
25 go test runtime -short -timeout'='120s -cpu'='1,2,4 | 23 GOMAXPROCS=2 go test runtime -short -timeout 120s -cpu 1,2,4 |
26 echo | 24 echo |
27 | 25 |
28 echo '# sync -cpu=10' | 26 echo '# sync -cpu=10' |
29 go test sync -short -timeout'='120s -cpu'='10 | 27 go test sync -short -timeout 120s -cpu 10 |
30 echo | 28 echo |
| 29 |
| 30 fn xcd { |
| 31 echo |
| 32 echo '#' $1 |
| 33 cd $"GOROOT/src/$1 |
| 34 } |
| 35 |
| 36 echo |
| 37 echo '#' ../misc/dashboard/builder ../misc/goplay |
| 38 go build ../misc/dashboard/builder ../misc/gplay |
| 39 |
| 40 echo |
| 41 echo '#' ../test/bench/go1 |
| 42 go test ../test/bench/go1 |
| 43 |
| 44 @{ |
| 45 xcd ../test |
| 46 time go run run.go |
| 47 } |
31 | 48 |
32 echo | 49 echo |
33 echo ALL TESTS PASSED | 50 echo ALL TESTS PASSED |
LEFT | RIGHT |