cmd/vendor/github.com/google/pprof/internal/driver: skip read only dir error on Android

On an android/amd64 emulator, $HOME points to / which is not writable.
Ignore the error in the pprof driver test.

With this, androidtest.sh on android/amd64 and android/386 passes.

Upstream pull request https://github.com/google/pprof/pull/295.

Change-Id: If919d7f44530a977fd044631ad01bac87d32deaa
Reviewed-on: https://go-review.googlesource.com/88817
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Elias Naur 2018-01-21 12:16:49 +01:00
parent 0133b5df60
commit 40ea396c09
1 changed files with 3 additions and 1 deletions

View File

@ -412,8 +412,10 @@ func TestHttpsInsecure(t *testing.T) {
Symbolize: "remote",
}
rx := "Saved profile in"
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") {
if runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64") ||
runtime.GOOS == "android" {
// On iOS, $HOME points to the app root directory and is not writable.
// On Android, $HOME points to / which is not writable.
rx += "|Could not use temp dir"
}
o := &plugin.Options{