Commit 45ccea71 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

Revert "Revert "cmd/dist: consolidate runtime CPU tests""

This reverts commit 81c2233b.

Change-Id: Ie7024f04dba6352ae79ba68d4da5c0c25844cd8c
Reviewed-on: https://go-review.googlesource.com/9397Reviewed-by: default avatarDave Cheney <dave@cheney.net>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 2a735590
...@@ -199,21 +199,18 @@ func (t *tester) registerTests() { ...@@ -199,21 +199,18 @@ func (t *tester) registerTests() {
} }
// Runtime CPU tests. // Runtime CPU tests.
for _, cpu := range []string{"1", "2", "4"} { testName := "runtime:cpu124"
cpu := cpu t.tests = append(t.tests, distTest{
testName := "runtime:cpu" + cpu name: testName,
t.tests = append(t.tests, distTest{ heading: "GOMAXPROCS=2 runtime -cpu=1,2,4",
name: testName, fn: func() error {
heading: "GOMAXPROCS=2 runtime -cpu=1,2,4", cmd := t.dirCmd("src", "go", "test", "-short", t.timeout(300), "runtime", "-cpu=1,2,4")
fn: func() error { // We set GOMAXPROCS=2 in addition to -cpu=1,2,4 in order to test runtime bootstrap code,
cmd := t.dirCmd("src", "go", "test", "-short", t.timeout(300), "runtime", "-cpu="+cpu) // 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, cmd.Env = mergeEnvLists([]string{"GOMAXPROCS=2"}, os.Environ())
// creation of first goroutines and first garbage collections in the parallel setting. return cmd.Run()
cmd.Env = mergeEnvLists([]string{"GOMAXPROCS=2"}, os.Environ()) },
return cmd.Run() })
},
})
}
// sync tests // sync tests
t.tests = append(t.tests, distTest{ t.tests = append(t.tests, distTest{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment