1
0
mirror of https://github.com/golang/go synced 2024-11-12 10:30:23 -07:00

run.{bash,bat,rc}: unset GOMAXPROCS before ../test

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
This commit is contained in:
Dave Cheney 2012-11-15 11:40:10 +11:00
parent 45b4867d0e
commit 36c4a73fb2
3 changed files with 9 additions and 2 deletions

View File

@ -115,7 +115,7 @@ echo '#' ../test/bench/go1
go test ../test/bench/go1
(xcd ../test
time go run run.go
GOMAXPROCS= time go run run.go
) || exit $?
echo

View File

@ -96,15 +96,22 @@ echo.
:: TODO: The other tests in run.bash.
set OLDGOMAXPROCS=%GOMAXPROCS%
echo # ..\test
cd ..\test
set FAIL=0
set GOMAXPROCS=
go run run.go
if errorlevel 1 set FAIL=1
cd ..\src
echo.
if %FAIL%==1 goto fail
set GOMAXPROCS=%OLDGOMAXPROCS%
set OLDGOMAXPROCS=
echo # Checking API compatibility.
go tool api -c ..\api\go1.txt -next ..\api\next.txt -except ..\api\except.txt
if errorlevel 1 goto fail

View File

@ -43,7 +43,7 @@ go test ../test/bench/go1
@{
xcd ../test
time go run run.go
GOMAXPROCS='' time go run run.go
}
echo