aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/script/scripttest
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/internal/script/scripttest')
-rw-r--r--src/cmd/internal/script/scripttest/run.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cmd/internal/script/scripttest/run.go b/src/cmd/internal/script/scripttest/run.go
index 8dff13e22e..2a909f656d 100644
--- a/src/cmd/internal/script/scripttest/run.go
+++ b/src/cmd/internal/script/scripttest/run.go
@@ -137,6 +137,9 @@ func RunToolScriptTest(t *testing.T, repls []ToolReplacement, scriptsdir string,
env := os.Environ()
prependToPath(env, filepath.Join(tgr, "bin"))
env = setenv(env, "GOROOT", tgr)
+ // GOOS and GOARCH are expected to be set by the toolchain script conditions.
+ env = setenv(env, "GOOS", runtime.GOOS)
+ env = setenv(env, "GOARCH", runtime.GOARCH)
for _, repl := range repls {
// consistency check
chunks := strings.Split(repl.EnvVar, "=")