Commit 8a2c34e4 authored by David Crawshaw's avatar David Crawshaw

os: Executable can use /proc/self/exe on android

Fixes the os test on the Android builder.

Change-Id: Ibb9db712156a620fcccf515e035475c5e2f535a5
Reviewed-on: https://go-review.googlesource.com/33650
Run-TryBot: David Crawshaw <crawshaw@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent d0d8466a
...@@ -19,7 +19,7 @@ var executablePath, executablePathErr = func() (string, error) { ...@@ -19,7 +19,7 @@ var executablePath, executablePathErr = func() (string, error) {
switch runtime.GOOS { switch runtime.GOOS {
default: default:
return "", errors.New("Executable not implemented for " + runtime.GOOS) return "", errors.New("Executable not implemented for " + runtime.GOOS)
case "linux": case "linux", "android":
procfn = "/proc/self/exe" procfn = "/proc/self/exe"
case "netbsd": case "netbsd":
procfn = "/proc/curproc/exe" procfn = "/proc/curproc/exe"
......
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