aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist/test.go
diff options
context:
space:
mode:
authorJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-03-25 08:50:19 -0700
committerJohan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>2023-04-06 22:37:50 +0000
commit7f5af094f83957680114e3fd357cfd4b7a5b34c1 (patch)
treeb5620bd27ccf63c03eb66bb64bb712c391f9597f /src/cmd/dist/test.go
parent17770315280330ff3cbe4fb32620e020b0218bd6 (diff)
downloadgo-7f5af094f83957680114e3fd357cfd4b7a5b34c1.tar.gz
go-7f5af094f83957680114e3fd357cfd4b7a5b34c1.zip
cmd: add wasip1 support
For #58141 Co-authored-by: Richard Musiol <neelance@gmail.com> Co-authored-by: Achille Roussel <achille.roussel@gmail.com> Co-authored-by: Julien Fabre <ju.pryz@gmail.com> Co-authored-by: Evan Phoenix <evan@phx.io> Change-Id: I530ea78a3cd142f3a745f650b21c30e7f10ce981 Reviewed-on: https://go-review.googlesource.com/c/go/+/479621 Reviewed-by: Bryan Mills <bcmills@google.com> Auto-Submit: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/cmd/dist/test.go')
-rw-r--r--src/cmd/dist/test.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index fa03068350..01452ba7e5 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -675,7 +675,7 @@ func (t *tester) registerTests() {
}
// Runtime CPU tests.
- if !t.compileOnly && goos != "js" { // js can't handle -cpu != 1
+ if !t.compileOnly && t.hasParallelism() {
t.registerTest("runtime:cpu124", "GOMAXPROCS=2 runtime -cpu=1,2,4 -quick",
&goTest{
timeout: 300 * time.Second,
@@ -737,9 +737,9 @@ func (t *tester) registerTests() {
// On the builders only, test that a moved GOROOT still works.
// Fails on iOS because CC_FOR_TARGET refers to clangwrap.sh
// in the unmoved GOROOT.
- // Fails on Android and js/wasm with an exec format error.
+ // Fails on Android, js/wasm and wasip1/wasm with an exec format error.
// Fails on plan9 with "cannot find GOROOT" (issue #21016).
- if os.Getenv("GO_BUILDER_NAME") != "" && goos != "android" && !t.iOS() && goos != "plan9" && goos != "js" {
+ if os.Getenv("GO_BUILDER_NAME") != "" && goos != "android" && !t.iOS() && goos != "plan9" && goos != "js" && goos != "wasip1" {
t.tests = append(t.tests, distTest{
name: "moved_goroot",
heading: "moved GOROOT",
@@ -835,7 +835,7 @@ func (t *tester) registerTests() {
}
// sync tests
- if goos != "js" { // js doesn't support -cpu=10
+ if t.hasParallelism() {
t.registerTest("sync_cpu", "sync -cpu=10",
&goTest{
timeout: 120 * time.Second,
@@ -1476,6 +1476,14 @@ func (t *tester) hasSwig() bool {
return true
}
+func (t *tester) hasParallelism() bool {
+ switch goos {
+ case "js", "wasip1":
+ return false
+ }
+ return true
+}
+
func (t *tester) raceDetectorSupported() bool {
if gohostos != goos {
return false