aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/crash_cgo_test.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2016-08-30 11:08:47 -0700
committerKeith Randall <khr@golang.org>2016-08-30 22:49:11 +0000
commit842b05832fb5088a212e30962f58c95a38296d32 (patch)
tree7454308e3546c1f3cd8ba9901ec282aa453b1645 /src/runtime/crash_cgo_test.go
parentbe23e98e06b1e1c65de19d460537c4df21ebf555 (diff)
downloadgo-842b05832fb5088a212e30962f58c95a38296d32.tar.gz
go-842b05832fb5088a212e30962f58c95a38296d32.zip
all: use testing.GoToolPath instead of "go"
This change makes sure that tests are run with the correct version of the go tool. The correct version is the one that we invoked with "go test", not the one that is first in our path. Fixes #16577 Change-Id: If22c8f8c3ec9e7c35d094362873819f2fbb8559b Reviewed-on: https://go-review.googlesource.com/28089 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/crash_cgo_test.go')
-rw-r--r--src/runtime/crash_cgo_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/crash_cgo_test.go b/src/runtime/crash_cgo_test.go
index 534b9f8b5a..3de07280de 100644
--- a/src/runtime/crash_cgo_test.go
+++ b/src/runtime/crash_cgo_test.go
@@ -255,7 +255,7 @@ func testCgoPprof(t *testing.T, buildArg, runArg string) {
fn := strings.TrimSpace(string(got))
defer os.Remove(fn)
- cmd := testEnv(exec.Command("go", "tool", "pprof", "-top", "-nodecount=1", exe, fn))
+ cmd := testEnv(exec.Command(testenv.GoToolPath(t), "tool", "pprof", "-top", "-nodecount=1", exe, fn))
found := false
for i, e := range cmd.Env {