Commits

Dave Cheney  committed c4cc7dc Draft

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
http://codereview.appspot.com/6847050

  • Participants
  • Parent commits dc4a3f6

Comments (0)

Files changed (3)

File src/run.bash

 go test ../test/bench/go1
 
 (xcd ../test
-time go run run.go
+GOMAXPROCS= time go run run.go
 ) || exit $?
 
 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
 
 @{
 	xcd ../test
-	time go run run.go
+	GOMAXPROCS='' time go run run.go
 }
 
 echo