Skip to content

Commit

Permalink
cmd/dist: let the three runtime -quick tests run simultaneously
Browse files Browse the repository at this point in the history
For golang#65164

Change-Id: Id797a402fffd70643ebaae74f4450dacfa2b6dd3
  • Loading branch information
qiulaidongfeng committed Feb 2, 2024
1 parent 2f6a25f commit 68b204a
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions src/cmd/dist/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,18 +705,45 @@ func (t *tester) registerTests() {

// Runtime CPU tests.
if !t.compileOnly && t.hasParallelism() {
t.registerTest("GOMAXPROCS=2 runtime -cpu=1,2,4 -quick",
t.registerTest("GOMAXPROCS=2 runtime -cpu=1 -quick",
&goTest{
variant: "cpu124",
variant: "cpu1",
timeout: 300 * time.Second,
cpu: "1,2,4",
cpu: "1",
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",
})
},
)
t.registerTest("GOMAXPROCS=2 runtime -cpu=2 -quick",
&goTest{
variant: "cpu2",
timeout: 300 * time.Second,
cpu: "2",
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",
},
)
t.registerTest("GOMAXPROCS=2 runtime -cpu=4 -quick",
&goTest{
variant: "cpu4",
timeout: 300 * time.Second,
cpu: "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",
},
)
}

// GOEXPERIMENT=rangefunc tests
Expand Down

0 comments on commit 68b204a

Please sign in to comment.