]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/pprof: fix the protobuf tests on Android
authorElias Naur <elias.naur@gmail.com>
Tue, 7 Mar 2017 19:04:23 +0000 (20:04 +0100)
committerElias Naur <elias.naur@gmail.com>
Tue, 7 Mar 2017 19:18:04 +0000 (19:18 +0000)
Change-Id: I5f85a7980b9a18d3641c4ee8b0992671a8421bb0
Reviewed-on: https://go-review.googlesource.com/37896
Run-TryBot: Elias Naur <elias.naur@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/runtime/pprof/proto_test.go

index aa2d03b449659a40f9252d6d8da5ef2615f7a410..98f217583b6c304ab2a5626358c8b0d76bf19517 100644 (file)
@@ -70,7 +70,7 @@ func f2() { f2() }
 // testPCs returns two PCs and two corresponding memory mappings
 // to use in test profiles.
 func testPCs(t *testing.T) (addr1, addr2 uint64, map1, map2 *profile.Mapping) {
-       if runtime.GOOS == "linux" {
+       if runtime.GOOS == "linux" || runtime.GOOS == "android" {
                // Figure out two addresses from /proc/self/maps.
                mmap, err := ioutil.ReadFile("/proc/self/maps")
                if err != nil {