1
0
mirror of https://github.com/golang/go synced 2024-10-03 03:11:21 -06:00
go/src/run.rc
Anthony Martin a7fe1f1612 build: be verbose when running tests on Plan 9
This is a temporary change to see how far the
builder gets when it times out.

LGTM=aram, 0intro
R=0intro, aram
CC=golang-codereviews, mischief
https://golang.org/cl/111400043
2014-07-20 13:14:53 +03:00

62 lines
1.4 KiB
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.
rfork e
eval `{go env}
GOPATH = () # we disallow local import for non-local packages, if $GOROOT happens
# to be under $GOPATH, then some tests below will fail
# allow all.rc to avoid double-build of everything
rebuild = true
if(~ $1 --no-rebuild)
shift
if not {
# Run only one process at a time on 9vx.
if(~ $sysname vx32)
pflag = (-p 1)
echo '# Building packages and commands.'
time go install -a -v $pflag std
echo
}
# we must unset GOROOT_FINAL before tests, because runtime/debug requires
# correct access to source code, so if we have GOROOT_FINAL in effect,
# at least runtime/debug test will fail.
GOROOT_FINAL = ()
echo '# Testing packages.'
time go test std -short -timeout 120s
echo
# We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code,
# creation of first goroutines and first garbage collections in the parallel setting.
echo '# GOMAXPROCS=2 runtime -cpu=1,2,4'
GOMAXPROCS=2 go test runtime -short -timeout 240s -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 '#' ../test/bench/go1
go test ../test/bench/go1
@{
xcd ../test
GOMAXPROCS='' time go run run.go -v
}
echo
echo ALL TESTS PASSED