cmd/compile/internal/gc: use GoToolPath in TestDeps

Updates #31563
Fixes #34041

Change-Id: Ib9fdcd2f83d867fd31b42eab3a813f5cef88860e
Reviewed-on: https://go-review.googlesource.com/c/go/+/193077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
This commit is contained in:
Ian Lance Taylor 2019-09-03 10:30:24 -07:00
parent 7c90e2cbda
commit aee084b3ca
1 changed files with 1 additions and 2 deletions

View File

@ -12,8 +12,7 @@ import (
)
func TestDeps(t *testing.T) {
testenv.MustHaveGoBuild(t)
out, err := exec.Command("go", "list", "-f", "{{.Deps}}", "cmd/compile/internal/gc").Output()
out, err := exec.Command(testenv.GoToolPath(t), "list", "-f", "{{.Deps}}", "cmd/compile/internal/gc").Output()
if err != nil {
t.Fatal(err)
}