LEFT | RIGHT |
(no file at all) | |
1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
2 # Copyright 2009 The Go Authors. All rights reserved. | 2 # Copyright 2009 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 set -e | 6 set -e |
7 | 7 |
8 eval $(go env) | 8 eval $(go env) |
9 | 9 |
10 unset CDPATH # in case user has it set | 10 unset CDPATH # in case user has it set |
(...skipping 17 matching lines...) Expand all Loading... |
28 echo '# Building packages and commands.' | 28 echo '# Building packages and commands.' |
29 time go install -a -v std | 29 time go install -a -v std |
30 echo | 30 echo |
31 fi | 31 fi |
32 | 32 |
33 # we must unset GOROOT_FINAL before tests, because runtime/debug requires | 33 # we must unset GOROOT_FINAL before tests, because runtime/debug requires |
34 # correct access to source code, so if we have GOROOT_FINAL in effect, | 34 # correct access to source code, so if we have GOROOT_FINAL in effect, |
35 # at least runtime/debug test will fail. | 35 # at least runtime/debug test will fail. |
36 unset GOROOT_FINAL | 36 unset GOROOT_FINAL |
37 | 37 |
| 38 # increase timeout for ARM up to 3 times the normal value |
| 39 timeout_scale=1 |
| 40 [ "$GOARCH" == "arm" ] && timeout_scale=3 |
| 41 |
38 echo '# Testing packages.' | 42 echo '# Testing packages.' |
39 time go test std -short -timeout=120s | 43 time go test std -short -timeout=$(expr 120 \* $timeout_scale)s |
40 echo | 44 echo |
41 | 45 |
42 echo '# GOMAXPROCS=2 runtime -cpu=1,2,4' | 46 echo '# GOMAXPROCS=2 runtime -cpu=1,2,4' |
43 GOMAXPROCS=2 go test runtime -short -timeout=240s -cpu=1,2,4 | 47 GOMAXPROCS=2 go test runtime -short -timeout=$(expr 240 \* $timeout_scale)s -cpu
=1,2,4 |
44 echo | 48 echo |
45 | 49 |
46 echo '# sync -cpu=10' | 50 echo '# sync -cpu=10' |
47 go test sync -short -timeout=120s -cpu=10 | 51 go test sync -short -timeout=$(expr 120 \* $timeout_scale)s -cpu=10 |
48 | 52 |
49 # Race detector only supported on Linux and OS X, | 53 # Race detector only supported on Linux and OS X, |
50 # and only on amd64, and only when cgo is enabled. | 54 # and only on amd64, and only when cgo is enabled. |
51 case "$GOHOSTOS-$GOOS-$GOARCH-$CGO_ENABLED" in | 55 case "$GOHOSTOS-$GOOS-$GOARCH-$CGO_ENABLED" in |
52 linux-linux-amd64-1 | darwin-darwin-amd64-1) | 56 linux-linux-amd64-1 | darwin-darwin-amd64-1) |
53 echo | 57 echo |
54 echo '# Testing race detector.' | 58 echo '# Testing race detector.' |
55 go test -race -i flag | 59 go test -race -i flag |
56 go test -race -short flag | 60 go test -race -short flag |
57 esac | 61 esac |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 unset GOMAXPROCS | 132 unset GOMAXPROCS |
129 time go run run.go | 133 time go run run.go |
130 ) || exit $? | 134 ) || exit $? |
131 | 135 |
132 echo | 136 echo |
133 echo '# Checking API compatibility.' | 137 echo '# Checking API compatibility.' |
134 go tool api -c $GOROOT/api/go1.txt -next $GOROOT/api/next.txt -except $GOROOT/ap
i/except.txt | 138 go tool api -c $GOROOT/api/go1.txt -next $GOROOT/api/next.txt -except $GOROOT/ap
i/except.txt |
135 | 139 |
136 echo | 140 echo |
137 echo ALL TESTS PASSED | 141 echo ALL TESTS PASSED |
LEFT | RIGHT |