cmd/dist: let the three runtime -quick tests run simultaneously

For #65164

Change-Id: Ied19cebd113ef91c34f613cafbeb92a335d6420d
GitHub-Last-Rev: 8118be6e30
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>
This commit is contained in:
qiulaidongfeng 2024-02-14 01:51:47 +00:00 committed by Gopher Robot
parent b8c76effd9
commit 1571c0b338
1 changed files with 14 additions and 12 deletions

26
src/cmd/dist/test.go vendored
View File

@ -705,18 +705,20 @@ func (t *tester) registerTests() {
// Runtime CPU tests. // Runtime CPU tests.
if !t.compileOnly && t.hasParallelism() { if !t.compileOnly && t.hasParallelism() {
t.registerTest("GOMAXPROCS=2 runtime -cpu=1,2,4 -quick", for i := 1; i <= 4; i *= 2 {
&goTest{ t.registerTest(fmt.Sprintf("GOMAXPROCS=2 runtime -cpu=%d -quick", i),
variant: "cpu124", &goTest{
timeout: 300 * time.Second, variant: "cpu" + strconv.Itoa(i),
cpu: "1,2,4", timeout: 300 * time.Second,
short: true, cpu: strconv.Itoa(i),
testFlags: []string{"-quick"}, short: true,
// We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code, testFlags: []string{"-quick"},
// creation of first goroutines and first garbage collections in the parallel setting. // We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code,
env: []string{"GOMAXPROCS=2"}, // creation of first goroutines and first garbage collections in the parallel setting.
pkg: "runtime", env: []string{"GOMAXPROCS=2"},
}) pkg: "runtime",
})
}
} }
// GOEXPERIMENT=rangefunc tests // GOEXPERIMENT=rangefunc tests