mirror of
https://github.com/golang/go
synced 2024-11-26 05:17:58 -07:00
io/fs: remove darwin/arm64 special condition
It isn't necessary on darwin/arm64 (macOS). It was probably leftover from the old code when darwin/arm64 meant iOS. The test passes on iOS builder. Apparently this is not needed either. Remove. Change-Id: I6fa0c55d6086325d4b722862c4fe6c30bcd6e6e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/280158 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
20d0991b86
commit
95ce805d14
@ -9,7 +9,6 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
pathpkg "path"
|
pathpkg "path"
|
||||||
"runtime"
|
|
||||||
"testing"
|
"testing"
|
||||||
"testing/fstest"
|
"testing/fstest"
|
||||||
)
|
)
|
||||||
@ -96,32 +95,7 @@ func mark(entry DirEntry, err error, errors *[]error, clear bool) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func chtmpdir(t *testing.T) (restore func()) {
|
|
||||||
oldwd, err := os.Getwd()
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("chtmpdir: %v", err)
|
|
||||||
}
|
|
||||||
d, err := ioutil.TempDir("", "test")
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("chtmpdir: %v", err)
|
|
||||||
}
|
|
||||||
if err := os.Chdir(d); err != nil {
|
|
||||||
t.Fatalf("chtmpdir: %v", err)
|
|
||||||
}
|
|
||||||
return func() {
|
|
||||||
if err := os.Chdir(oldwd); err != nil {
|
|
||||||
t.Fatalf("chtmpdir: %v", err)
|
|
||||||
}
|
|
||||||
os.RemoveAll(d)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestWalkDir(t *testing.T) {
|
func TestWalkDir(t *testing.T) {
|
||||||
if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
|
|
||||||
restore := chtmpdir(t)
|
|
||||||
defer restore()
|
|
||||||
}
|
|
||||||
|
|
||||||
tmpDir, err := ioutil.TempDir("", "TestWalk")
|
tmpDir, err := ioutil.TempDir("", "TestWalk")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal("creating temp dir:", err)
|
t.Fatal("creating temp dir:", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user