]> Cypherpunks repositories - gostls13.git/commit
runtime/pprof: use testenv.GoToolPath in TestMapping
authorAlberto Donizetti <alb.donizetti@gmail.com>
Wed, 13 Jun 2018 18:48:26 +0000 (20:48 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 14 Jun 2018 13:45:55 +0000 (13:45 +0000)
commit70c3bf27de465099de114dae15b78d9dd56dac7e
treebb3fa71b0c3ae46e22af0776886aaa5748faf2c0
parentd8e86caa3f1b6d4454ac2590272522acb0a6c234
runtime/pprof: use testenv.GoToolPath in TestMapping

The TestMapping test invokes the go tool in an exec.Command by
directly hard-coding a "go" string for the command. This can cause
test failures on systems where the "go" command points to an old
toolchain where the test is not supposed to work.

Use testenv.GoToolPath instead.

Also call 'go run' directly on the mappingtest/main.go file instead of
go-running the directory.

Change-Id: Ib91877c021209cbf4da50a561737d7a9d42c6adc
Reviewed-on: https://go-review.googlesource.com/118662
Run-TryBot: Alberto Donizetti <alb.donizetti@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/runtime/pprof/proto_test.go