]> Cypherpunks repositories - gostls13.git/commitdiff
run.bash: explain why we set GOMAXPROCS for runtime test
authorDmitriy Vyukov <dvyukov@google.com>
Thu, 6 Mar 2014 09:16:14 +0000 (13:16 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Thu, 6 Mar 2014 09:16:14 +0000 (13:16 +0400)
Fixes #7459.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/71060044

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

index a3eecff0f039a434edcf6307ea2ae0aeae7d11a5..8e8715cab0f188c632e1755d8e81ead8d6d0715d 100755 (executable)
@@ -54,6 +54,8 @@ echo '# Testing packages.'
 time go test std -short -timeout=$(expr 120 \* $timeout_scale)s
 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=$(expr 300 \* $timeout_scale)s -cpu=1,2,4
 echo
index f01032699ed13b3a77a5042dff442f53d6cb54fd..fdaacfff44119be5fd4f1318f9f642690a0d1ecf 100644 (file)
@@ -42,11 +42,19 @@ go test std -short -timeout=120s
 if errorlevel 1 goto fail
 echo.
 
-echo # runtime -cpu=1,2,4
+set OLDGOMAXPROCS=%GOMAXPROCS%
+
+:: 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
+set GOMAXPROCS=2
 go test runtime -short -timeout=300s -cpu=1,2,4
 if errorlevel 1 goto fail
 echo.
 
+set GOMAXPROCS=%OLDGOMAXPROCS%
+set OLDGOMAXPROCS=
+
 echo # sync -cpu=10
 go test sync -short -timeout=120s -cpu=10
 if errorlevel 1 goto fail
index f9837d4fce32f0f1605cd13f97fb97b13e7d3980..2613621556700ee0431e9ed1d786f78741a9ad26 100755 (executable)
@@ -32,6 +32,8 @@ 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