diff options
author | Keith Randall <khr@golang.org> | 2016-08-30 11:08:47 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2016-08-30 22:49:11 +0000 |
commit | 842b05832fb5088a212e30962f58c95a38296d32 (patch) | |
tree | 7454308e3546c1f3cd8ba9901ec282aa453b1645 /src/runtime/race/output_test.go | |
parent | be23e98e06b1e1c65de19d460537c4df21ebf555 (diff) | |
download | go-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/race/output_test.go')
-rw-r--r-- | src/runtime/race/output_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/race/output_test.go b/src/runtime/race/output_test.go index 5157f7e4bd9..f1dc4482f19 100644 --- a/src/runtime/race/output_test.go +++ b/src/runtime/race/output_test.go @@ -7,6 +7,7 @@ package race_test import ( + "internal/testenv" "io/ioutil" "os" "os/exec" @@ -41,7 +42,7 @@ func TestOutput(t *testing.T) { t.Fatalf("failed to close file: %v", err) } // Pass -l to the compiler to test stack traces. - cmd := exec.Command("go", test.run, "-race", "-gcflags=-l", src) + cmd := exec.Command(testenv.GoToolPath(t), test.run, "-race", "-gcflags=-l", src) // GODEBUG spoils program output, GOMAXPROCS makes it flaky. for _, env := range os.Environ() { if strings.HasPrefix(env, "GODEBUG=") || |