@@ -675,7 +675,7 @@ func (t *tester) registerTests() {
675675 }
676676
677677 // Runtime CPU tests.
678- if ! t .compileOnly && goos != "js" { // js can't handle -cpu != 1
678+ if ! t .compileOnly && t . hasParallelism () {
679679 t .registerTest ("runtime:cpu124" , "GOMAXPROCS=2 runtime -cpu=1,2,4 -quick" ,
680680 & goTest {
681681 timeout : 300 * time .Second ,
@@ -737,9 +737,9 @@ func (t *tester) registerTests() {
737737 // On the builders only, test that a moved GOROOT still works.
738738 // Fails on iOS because CC_FOR_TARGET refers to clangwrap.sh
739739 // in the unmoved GOROOT.
740- // Fails on Android and js /wasm with an exec format error.
740+ // Fails on Android, js/wasm and wasip1 /wasm with an exec format error.
741741 // Fails on plan9 with "cannot find GOROOT" (issue #21016).
742- if os .Getenv ("GO_BUILDER_NAME" ) != "" && goos != "android" && ! t .iOS () && goos != "plan9" && goos != "js" {
742+ if os .Getenv ("GO_BUILDER_NAME" ) != "" && goos != "android" && ! t .iOS () && goos != "plan9" && goos != "js" && goos != "wasip1" {
743743 t .tests = append (t .tests , distTest {
744744 name : "moved_goroot" ,
745745 heading : "moved GOROOT" ,
@@ -835,7 +835,7 @@ func (t *tester) registerTests() {
835835 }
836836
837837 // sync tests
838- if goos != "js" { // js doesn't support -cpu=10
838+ if t . hasParallelism () {
839839 t .registerTest ("sync_cpu" , "sync -cpu=10" ,
840840 & goTest {
841841 timeout : 120 * time .Second ,
@@ -1476,6 +1476,14 @@ func (t *tester) hasSwig() bool {
14761476 return true
14771477}
14781478
1479+ func (t * tester ) hasParallelism () bool {
1480+ switch goos {
1481+ case "js" , "wasip1" :
1482+ return false
1483+ }
1484+ return true
1485+ }
1486+
14791487func (t * tester ) raceDetectorSupported () bool {
14801488 if gohostos != goos {
14811489 return false
0 commit comments