]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/vendor/github.com/google/pprof/internal/driver: skip read only dir error on Android
authorElias Naur <elias.naur@gmail.com>
Sun, 21 Jan 2018 11:16:49 +0000 (12:16 +0100)
committerElias Naur <elias.naur@gmail.com>
Mon, 22 Jan 2018 16:53:10 +0000 (16:53 +0000)
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>
src/cmd/vendor/github.com/google/pprof/internal/driver/fetch_test.go

index 5bcd40daa7a2e0b7dfe8322baddc155da9a00343..32af2e9b20729fdbcb99138fa22905319c9a4952 100644 (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{