Skip to content

Commit 1571c0b

Browse files
qiulaidongfenggopherbot
authored andcommitted
cmd/dist: let the three runtime -quick tests run simultaneously
For #65164 Change-Id: Ied19cebd113ef91c34f613cafbeb92a335d6420d GitHub-Last-Rev: 8118be6 GitHub-Pull-Request: #65444 Reviewed-on: https://go-review.googlesource.com/c/go/+/560597 Commit-Queue: Ian Lance Taylor <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Reviewed-by: Than McIntosh <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]>
1 parent b8c76ef commit 1571c0b

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/cmd/dist/test.go

+14-12
Original file line numberDiff line numberDiff line change
@@ -705,18 +705,20 @@ func (t *tester) registerTests() {
705705

706706
// Runtime CPU tests.
707707
if !t.compileOnly && t.hasParallelism() {
708-
t.registerTest("GOMAXPROCS=2 runtime -cpu=1,2,4 -quick",
709-
&goTest{
710-
variant: "cpu124",
711-
timeout: 300 * time.Second,
712-
cpu: "1,2,4",
713-
short: true,
714-
testFlags: []string{"-quick"},
715-
// We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code,
716-
// creation of first goroutines and first garbage collections in the parallel setting.
717-
env: []string{"GOMAXPROCS=2"},
718-
pkg: "runtime",
719-
})
708+
for i := 1; i <= 4; i *= 2 {
709+
t.registerTest(fmt.Sprintf("GOMAXPROCS=2 runtime -cpu=%d -quick", i),
710+
&goTest{
711+
variant: "cpu" + strconv.Itoa(i),
712+
timeout: 300 * time.Second,
713+
cpu: strconv.Itoa(i),
714+
short: true,
715+
testFlags: []string{"-quick"},
716+
// We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code,
717+
// creation of first goroutines and first garbage collections in the parallel setting.
718+
env: []string{"GOMAXPROCS=2"},
719+
pkg: "runtime",
720+
})
721+
}
720722
}
721723

722724
// GOEXPERIMENT=rangefunc tests

0 commit comments

Comments
 (0)