diff options
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/internal/wasitest/nonblock_test.go | 5 | ||||
| -rw-r--r-- | src/runtime/internal/wasitest/tcpecho_test.go | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/runtime/internal/wasitest/nonblock_test.go b/src/runtime/internal/wasitest/nonblock_test.go index 3072b96ed8..f5f6bb84d0 100644 --- a/src/runtime/internal/wasitest/nonblock_test.go +++ b/src/runtime/internal/wasitest/nonblock_test.go @@ -10,6 +10,7 @@ package wasi_test import ( "bufio" "fmt" + "internal/testenv" "io" "math/rand" "os" @@ -41,6 +42,8 @@ func TestNonblock(t *testing.T) { t.Skip("wasmer does not support non-blocking I/O") } + testenv.MustHaveGoRun(t) + for _, mode := range []string{"os.OpenFile", "os.NewFile"} { t.Run(mode, func(t *testing.T) { args := []string{"run", "./testdata/nonblock.go", mode} @@ -62,7 +65,7 @@ func TestNonblock(t *testing.T) { fifos[len(fifos)-i-1] = &fifo{file, path} } - subProcess := exec.Command("go", args...) + subProcess := exec.Command(testenv.GoToolPath(t), args...) subProcess.Env = append(os.Environ(), "GOOS=wasip1", "GOARCH=wasm") diff --git a/src/runtime/internal/wasitest/tcpecho_test.go b/src/runtime/internal/wasitest/tcpecho_test.go index bbcea90310..aa57d9e2e3 100644 --- a/src/runtime/internal/wasitest/tcpecho_test.go +++ b/src/runtime/internal/wasitest/tcpecho_test.go @@ -7,6 +7,7 @@ package wasi_test import ( "bytes" "fmt" + "internal/testenv" "math/rand" "net" "os" @@ -20,6 +21,8 @@ func TestTCPEcho(t *testing.T) { t.Skip() } + testenv.MustHaveGoRun(t) + // We're unable to use port 0 here (let the OS choose a spare port). // Although the WASM runtime accepts port 0, and the WASM module listens // successfully, there's no way for this test to query the selected port @@ -44,7 +47,7 @@ func TestTCPEcho(t *testing.T) { port++ } - subProcess := exec.Command("go", "run", "./testdata/tcpecho.go") + subProcess := exec.Command(testenv.GoToolPath(t), "run", "./testdata/tcpecho.go") subProcess.Env = append(os.Environ(), "GOOS=wasip1", "GOARCH=wasm") |
