diff --git a/src/os/is_wasi_no_test.go b/src/os/is_wasi_no_test.go deleted file mode 100644 index f98070cdc..000000000 --- a/src/os/is_wasi_no_test.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build !wasip1 - -package os_test - -const isWASI = false diff --git a/src/os/is_wasi_test.go b/src/os/is_wasi_test.go deleted file mode 100644 index 1e9ad898c..000000000 --- a/src/os/is_wasi_test.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build wasip1 - -package os_test - -const isWASI = true diff --git a/src/os/os_anyos_test.go b/src/os/os_anyos_test.go index 44606e163..8a082d652 100644 --- a/src/os/os_anyos_test.go +++ b/src/os/os_anyos_test.go @@ -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 } diff --git a/src/testing/is_wasi_no_test.go b/src/testing/is_wasi_no_test.go deleted file mode 100644 index 08b6d56c5..000000000 --- a/src/testing/is_wasi_no_test.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -//go:build !wasip1 - -package testing_test - -const isWASI = false diff --git a/src/testing/is_wasi_test.go b/src/testing/is_wasi_test.go deleted file mode 100644 index d39b6c867..000000000 --- a/src/testing/is_wasi_test.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -// -//go:build wasip1 - -package testing_test - -const isWASI = true diff --git a/src/testing/testing_test.go b/src/testing/testing_test.go index 631a31341..9f5249b0c 100644 --- a/src/testing/testing_test.go +++ b/src/testing/testing_test.go @@ -13,6 +13,7 @@ import ( "io/fs" "os" "path/filepath" + "runtime" "testing" ) @@ -25,7 +26,7 @@ func TestMain(m *testing.M) { } func TestTempDirInCleanup(t *testing.T) { - if isWASI { + if runtime.GOOS == "wasip1" { t.Log("Skipping. TODO: implement RemoveAll for wasi") return } @@ -62,7 +63,7 @@ func TestTempDirInBenchmark(t *testing.T) { } func TestTempDir(t *testing.T) { - if isWASI { + if runtime.GOOS == "wasip1" { t.Log("Skipping. TODO: implement RemoveAll for wasi") return }