]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "cmd/dist: consolidate runtime CPU tests"
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 27 Apr 2015 17:54:51 +0000 (17:54 +0000)
committerJosh Bleecher Snyder <josharian@gmail.com>
Mon, 27 Apr 2015 17:56:04 +0000 (17:56 +0000)
This reverts commit a9e50a6b358df2e725157128c140684264c8ed38.

Change-Id: I3c5e459f1030e36bc249910facdae12303a44151
Reviewed-on: https://go-review.googlesource.com/9394
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/dist/test.go

index 7ffe5d6f6291302f06830ac47f686acb920df026..112e40a0f3624992b9bc9a5f5459c7ec7e29fb3c 100644 (file)
@@ -199,18 +199,21 @@ func (t *tester) registerTests() {
        }
 
        // Runtime CPU tests.
-       testName := "runtime:cpu124"
-       t.tests = append(t.tests, distTest{
-               name:    testName,
-               heading: "GOMAXPROCS=2 runtime -cpu=1,2,4",
-               fn: func() error {
-                       cmd := t.dirCmd("src", "go", "test", "-short", t.timeout(300), "runtime", "-cpu=1,2,4")
-                       // 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.
-                       cmd.Env = mergeEnvLists([]string{"GOMAXPROCS=2"}, os.Environ())
-                       return cmd.Run()
-               },
-       })
+       for _, cpu := range []string{"1", "2", "4"} {
+               cpu := cpu
+               testName := "runtime:cpu" + cpu
+               t.tests = append(t.tests, distTest{
+                       name:    testName,
+                       heading: "GOMAXPROCS=2 runtime -cpu=1,2,4",
+                       fn: func() error {
+                               cmd := t.dirCmd("src", "go", "test", "-short", t.timeout(300), "runtime", "-cpu="+cpu)
+                               // 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.
+                               cmd.Env = mergeEnvLists([]string{"GOMAXPROCS=2"}, os.Environ())
+                               return cmd.Run()
+                       },
+               })
+       }
 
        // sync tests
        t.tests = append(t.tests, distTest{