diff options
Diffstat (limited to 'src/run.bash')
-rwxr-xr-x | src/run.bash | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/src/run.bash b/src/run.bash index a026b459c..305ff7f41 100755 --- a/src/run.bash +++ b/src/run.bash @@ -35,16 +35,20 @@ fi # at least runtime/debug test will fail. unset GOROOT_FINAL +# increase timeout for ARM up to 3 times the normal value +timeout_scale=1 +[ "$GOARCH" == "arm" ] && timeout_scale=3 + echo '# Testing packages.' -time go test std -short -timeout=120s +time go test std -short -timeout=$(expr 120 \* $timeout_scale)s echo echo '# GOMAXPROCS=2 runtime -cpu=1,2,4' -GOMAXPROCS=2 go test runtime -short -timeout=240s -cpu=1,2,4 +GOMAXPROCS=2 go test runtime -short -timeout=$(expr 240 \* $timeout_scale)s -cpu=1,2,4 echo echo '# sync -cpu=10' -go test sync -short -timeout=120s -cpu=10 +go test sync -short -timeout=$(expr 120 \* $timeout_scale)s -cpu=10 # Race detector only supported on Linux and OS X, # and only on amd64, and only when cgo is enabled. @@ -74,9 +78,28 @@ go run $GOROOT/test/run.go - . ) || exit $? [ "$CGO_ENABLED" != 1 ] || -[ "$GOHOSTOS" == openbsd ] || # issue 4878 (xcd ../misc/cgo/test -go test +set -e +go test -ldflags '-linkmode=auto' +go test -ldflags '-linkmode=internal' +case "$GOHOSTOS-$GOARCH" in +openbsd-386 | openbsd-amd64) + # test linkmode=external, but __thread not supported, so skip testtls. + go test -ldflags '-linkmode=external' + ;; +darwin-386 | darwin-amd64) + # linkmode=external fails on OS X 10.6 and earlier == Darwin + # 10.8 and earlier. + case $(uname -r) in + [0-9].* | 10.*) ;; + *) go test -ldflags '-linkmode=external' ;; + esac + ;; +freebsd-386 | freebsd-amd64 | linux-386 | linux-amd64 | netbsd-386 | netbsd-amd64) + go test -ldflags '-linkmode=external' + go test -ldflags '-linkmode=auto' ../testtls + go test -ldflags '-linkmode=external' ../testtls +esac ) || exit $? [ "$CGO_ENABLED" != 1 ] || @@ -113,9 +136,12 @@ go build ../misc/dashboard/builder ../misc/goplay ./timing.sh -test ) || exit $? +[ "$GOOS" == openbsd ] || # golang.org/issue/5057 +( echo echo '#' ../test/bench/go1 go test ../test/bench/go1 +) || exit $? (xcd ../test unset GOMAXPROCS @@ -124,7 +150,7 @@ time go run run.go echo echo '# Checking API compatibility.' -go tool api -c $GOROOT/api/go1.txt -next $GOROOT/api/next.txt -except $GOROOT/api/except.txt +go tool api -c $GOROOT/api/go1.txt,$GOROOT/api/go1.1.txt -next $GOROOT/api/next.txt -except $GOROOT/api/except.txt echo echo ALL TESTS PASSED |