Commit 154394f8 authored by David du Colombier's avatar David du Colombier

cmd/go: fix TestScript/mod_gobuild_import on Plan 9

CL 125296 added TestScript/mod_gobuild_import. This
test is failing on Plan 9, because go/build invokes
the go tool which cannot be found in the path.

The "PATH" environment variable has been updated to
contain the path to the go tool on Unix and Windows,
but on Plan 9, the analogous environment variable is
called "path".

This change fixes the script engine by setting
the "path" environment variable on Plan 9.

Fixes #26669.

Change-Id: If1be50e14baceccee591f4f76b7e698f5e12a2d4
Reviewed-on: https://go-review.googlesource.com/126608
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 5ad0a524
......@@ -98,6 +98,10 @@ func (ts *testScript) setup() {
":=" + string(os.PathListSeparator),
}
if runtime.GOOS == "plan9" {
ts.env = append(ts.env, "path="+testBin+string(filepath.ListSeparator)+os.Getenv("path"))
}
if runtime.GOOS == "windows" {
ts.env = append(ts.env, "exe=.exe")
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment