Commit 71371d85 authored by Elias Naur's avatar Elias Naur

os: skip Open("/") on Android

It's not supported in an app context:

$ go test -short os
--- FAIL: TestChdirAndGetwd (0.00s)
    os_test.go:1213: Open /: open /: permission denied

Change-Id: I56b951f925a50fd67715ee2f1de64951ee867e91
Reviewed-on: https://go-review.googlesource.com/c/go/+/170946
Run-TryBot: Elias Naur <mail@eliasnaur.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 1cff98d4
...@@ -1185,7 +1185,7 @@ func TestChdirAndGetwd(t *testing.T) { ...@@ -1185,7 +1185,7 @@ func TestChdirAndGetwd(t *testing.T) {
// /usr/bin does not usually exist on Plan 9 or Android. // /usr/bin does not usually exist on Plan 9 or Android.
switch runtime.GOOS { switch runtime.GOOS {
case "android": case "android":
dirs = []string{"/", "/system/bin"} dirs = []string{"/system/bin"}
case "plan9": case "plan9":
dirs = []string{"/", "/usr"} dirs = []string{"/", "/usr"}
case "darwin": case "darwin":
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment