summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cheney <dave@cheney.net>2012-11-15 11:40:10 +1100
committerDave Cheney <dave@cheney.net>2012-11-15 11:40:10 +1100
commit972b20bd8ee454f2575ef95527b0dd40fec069f4 (patch)
tree06f3566b5cb567e074a0cf189c145c8f84140cf7
parent02d5f0c99942cf7022cd7faa65e403053706eaeb (diff)
downloadgo-972b20bd8ee454f2575ef95527b0dd40fec069f4.tar.gz
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
-rwxr-xr-xsrc/run.bash2
-rw-r--r--src/run.bat7
-rwxr-xr-xsrc/run.rc2
3 files changed, 9 insertions, 2 deletions
diff --git a/src/run.bash b/src/run.bash
index 0de36feca..a8ab18947 100755
--- a/src/run.bash
+++ b/src/run.bash
@@ -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
diff --git a/src/run.bat b/src/run.bat
index 275107bf5..3f950f541 100644
--- a/src/run.bat
+++ b/src/run.bat
@@ -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
diff --git a/src/run.rc b/src/run.rc
index af4929776..e70f5c696 100755
--- a/src/run.rc
+++ b/src/run.rc
@@ -43,7 +43,7 @@ go test ../test/bench/go1
@{
xcd ../test
- time go run run.go
+ GOMAXPROCS='' time go run run.go
}
echo