aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist/test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/dist/test.go')
-rw-r--r--src/cmd/dist/test.go26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index fa6a0dd84d..80a134becd 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -705,18 +705,20 @@ func (t *tester) registerTests() {
// Runtime CPU tests.
if !t.compileOnly && t.hasParallelism() {
- t.registerTest("GOMAXPROCS=2 runtime -cpu=1,2,4 -quick",
- &goTest{
- variant: "cpu124",
- timeout: 300 * time.Second,
- cpu: "1,2,4",
- short: true,
- testFlags: []string{"-quick"},
- // 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.
- env: []string{"GOMAXPROCS=2"},
- pkg: "runtime",
- })
+ for i := 1; i <= 4; i *= 2 {
+ t.registerTest(fmt.Sprintf("GOMAXPROCS=2 runtime -cpu=%d -quick", i),
+ &goTest{
+ variant: "cpu" + strconv.Itoa(i),
+ timeout: 300 * time.Second,
+ cpu: strconv.Itoa(i),
+ short: true,
+ testFlags: []string{"-quick"},
+ // 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.
+ env: []string{"GOMAXPROCS=2"},
+ pkg: "runtime",
+ })
+ }
}
// GOEXPERIMENT=rangefunc tests