aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/addr2line
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/cmd/addr2line
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/cmd/addr2line')
-rw-r--r--src/cmd/addr2line/addr2line_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/addr2line/addr2line_test.go b/src/cmd/addr2line/addr2line_test.go
index 620b416c2c..2bd2e358c7 100644
--- a/src/cmd/addr2line/addr2line_test.go
+++ b/src/cmd/addr2line/addr2line_test.go
@@ -18,7 +18,7 @@ import (
)
func loadSyms(t *testing.T) map[string]string {
- cmd := exec.Command("go", "tool", "nm", os.Args[0])
+ cmd := exec.Command(testenv.GoToolPath(t), "tool", "nm", os.Args[0])
out, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("go tool nm %v: %v\n%s", os.Args[0], err, string(out))
@@ -98,7 +98,7 @@ func TestAddr2Line(t *testing.T) {
defer os.RemoveAll(tmpDir)
exepath := filepath.Join(tmpDir, "testaddr2line.exe")
- out, err := exec.Command("go", "build", "-o", exepath, "cmd/addr2line").CombinedOutput()
+ out, err := exec.Command(testenv.GoToolPath(t), "build", "-o", exepath, "cmd/addr2line").CombinedOutput()
if err != nil {
t.Fatalf("go build -o %v cmd/addr2line: %v\n%s", exepath, err, string(out))
}