]> Cypherpunks repositories - gostls13.git/commitdiff
run.{bash,bat,rc}: unset GOMAXPROCS before ../test
authorDave Cheney <dave@cheney.net>
Thu, 15 Nov 2012 00:40:10 +0000 (11:40 +1100)
committerDave Cheney <dave@cheney.net>
Thu, 15 Nov 2012 00:40:10 +0000 (11:40 +1100)
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

src/run.bash
src/run.bat
src/run.rc

index 0de36feca4496e31789ae547af5120d7c223fdff..a8ab1894748d49109d39b0a4f80a543d16e6759a 100755 (executable)
@@ -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
index 275107bf5349749d87e2e4925d60aa47f6b560a8..3f950f5414becdda53f0dd83c3aff8b663a79ef4 100644 (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
index af492977660ad17c98a0e4845c831a4e2d7a6eb4..e70f5c69662cad34c4182f05743cb1c558c0880c 100755 (executable)
@@ -43,7 +43,7 @@ go test ../test/bench/go1
 
 @{
        xcd ../test
-       time go run run.go
+       GOMAXPROCS='' time go run run.go
 }
 
 echo