mirror of
https://github.com/golang/go
synced 2024-10-07 07:31:21 -06:00
36c4a73fb2
test/run.go already executes tests in parallel where possible. An unknown GOMAXPROCS value during the tests is known to cause failures with tests that measure allocations. ref: https://groups.google.com/d/topic/golang-nuts/tgMhFJ3F5WY/discussion R=fullung, minux.ma, r CC=golang-dev https://golang.org/cl/6847050
51 lines
920 B
Bash
Executable File
51 lines
920 B
Bash
Executable File
#!/bin/rc -e
|
|
# Copyright 2012 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
eval `{go env -9}
|
|
|
|
# allow all.rc to avoid double-build of everything
|
|
rebuild = true
|
|
if(~ $1 --no-rebuild)
|
|
shift
|
|
if not {
|
|
echo '# Building packages and commands.'
|
|
time go install -a -v -p 1 std
|
|
echo
|
|
}
|
|
|
|
echo '# Testing packages.'
|
|
time go test std -short -timeout 120s
|
|
echo
|
|
|
|
echo '# GOMAXPROCS=2 runtime -cpu=1,2,4'
|
|
GOMAXPROCS=2 go test runtime -short -timeout 120s -cpu 1,2,4
|
|
echo
|
|
|
|
echo '# sync -cpu=10'
|
|
go test sync -short -timeout 120s -cpu 10
|
|
echo
|
|
|
|
fn xcd {
|
|
echo
|
|
echo '#' $1
|
|
cd $"GOROOT/src/$1
|
|
}
|
|
|
|
echo
|
|
echo '#' ../misc/dashboard/builder ../misc/goplay
|
|
go build ../misc/dashboard/builder ../misc/gplay
|
|
|
|
echo
|
|
echo '#' ../test/bench/go1
|
|
go test ../test/bench/go1
|
|
|
|
@{
|
|
xcd ../test
|
|
GOMAXPROCS='' time go run run.go
|
|
}
|
|
|
|
echo
|
|
echo ALL TESTS PASSED
|