@@ -705,18 +705,20 @@ func (t *tester) registerTests() {
705
705
706
706
// Runtime CPU tests.
707
707
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
+ }
720
722
}
721
723
722
724
// GOEXPERIMENT=rangefunc tests
0 commit comments