Skip to content

Commit

Permalink
n
Browse files Browse the repository at this point in the history
Change-Id: I48401c6ef1e05e40e1f9abacc048861fad21dfca
  • Loading branch information
qiulaidongfeng committed Feb 14, 2024
1 parent 78be88c commit 8118be6
Showing 1 changed file with 14 additions and 39 deletions.
53 changes: 14 additions & 39 deletions src/cmd/dist/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,45 +705,20 @@ func (t *tester) registerTests() {

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

0 comments on commit 8118be6

Please sign in to comment.