os, testing: just check runtime.GOOS == "wasip1"

This commit is contained in:
Randy Reddig
2024-03-04 10:48:20 -08:00
committed by Ron Evans
parent 32a056c32a
commit 8bd0155c51
6 changed files with 5 additions and 32 deletions
-5
View File
@@ -1,5 +0,0 @@
//go:build !wasip1
package os_test
const isWASI = false
-5
View File
@@ -1,5 +0,0 @@
//go:build wasip1
package os_test
const isWASI = true
+2 -2
View File
@@ -275,7 +275,7 @@ func TestDirFS(t *testing.T) {
t.Log("TODO: implement Readdir for Windows")
return
}
if isWASI {
if runtime.GOOS == "wasip1" {
t.Log("TODO: allow foo/bar/. as synonym for path foo/bar on wasi?")
return
}
@@ -296,7 +296,7 @@ func TestDirFSPathsValid(t *testing.T) {
t.Log("skipping on Windows")
return
}
if isWASI {
if runtime.GOOS == "wasip1" {
t.Log("skipping on wasi because it fails on wasi on windows")
return
}