diff options
author | qiulaidongfeng <2645477756@qq.com> | 2024-02-14 01:51:47 +0000 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2024-02-28 12:44:07 +0000 |
commit | 1571c0b338971be0068861d6dd63a0da6511bc0c (patch) | |
tree | 5f713bc250a89a3a17aef5fecdcc06c003fd5eb9 | |
parent | b8c76effd9a3a30d66e44ed7acea789e4e95b926 (diff) | |
download | go-1571c0b338971be0068861d6dd63a0da6511bc0c.tar.gz go-1571c0b338971be0068861d6dd63a0da6511bc0c.zip |
cmd/dist: let the three runtime -quick tests run simultaneously
For #65164
Change-Id: Ied19cebd113ef91c34f613cafbeb92a335d6420d
GitHub-Last-Rev: 8118be6e30ffc4edcd88b8a1d5ee3105e2c760de
GitHub-Pull-Request: golang/go#65444
Reviewed-on: https://go-review.googlesource.com/c/go/+/560597
Commit-Queue: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
-rw-r--r-- | src/cmd/dist/test.go | 26 |
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 |