TestReaddirnamesOneAtATime and TestChdirAndGetwd assumes the underlying file system
has /usr/bin but it is not the case when running it on WASI runtime hosted on Windows.
This change adds wasip1 in the special cased switch case to make them host OS agonstic.
Change-Id: Idb667021b565f939c814b9cd9e637cd75f9a610d
Reviewed-on: https://go-review.googlesource.com/c/go/+/489575
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
switch runtime.GOOS {
case "android":
dir = "/system/bin"
- case "ios":
+ case "ios", "wasip1":
wd, err := Getwd()
if err != nil {
t.Fatal(err)
dirs = []string{"/system/bin"}
case "plan9":
dirs = []string{"/", "/usr"}
- case "ios", "windows":
+ case "ios", "windows", "wasip1":
dirs = nil
for _, dir := range []string{t.TempDir(), t.TempDir()} {
// Expand symlinks so path equality tests work.