aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/README
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2019-06-10 12:31:13 -0400
committerBryan C. Mills <bcmills@google.com>2019-06-10 21:00:48 +0000
commitbff0ae6a0174f48a15ef3dcc661c8458e37a9d4a (patch)
tree72bac737c520cc26bbf6de354874d3e65cb44a37 /src/cmd/go/testdata/script/README
parent5ce1819ccab65ceefa3198bbc78fb4dcac3cca6e (diff)
downloadgo-bff0ae6a0174f48a15ef3dcc661c8458e37a9d4a.tar.gz
go-bff0ae6a0174f48a15ef3dcc661c8458e37a9d4a.zip
cmd/go: in TestScript, set $GOEXE instead of $exe
$GOEXE exists and is documented in 'go env', so $exe is redundant and a bit confusing. Notably, mod_modinfo.txt already assumes that GOEXE is set (even though it isn't), and thus fails on Windows. After this CL, `go test cmd/go/...` passes on a windows-amd64-2016 builder. However, given that the $PATH on the builder is very minimal (#32430) and network access is limited, tests that rely on binaries (such as 'git') or external networking may still be broken. Updates #25300 Change-Id: I9d80f2a0fbaa8bc35fa2205b6898aeccecda4e94 Reviewed-on: https://go-review.googlesource.com/c/go/+/181542 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/go/testdata/script/README')
-rw-r--r--src/cmd/go/testdata/script/README3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/go/testdata/script/README b/src/cmd/go/testdata/script/README
index 3dceb735aa..66ab8515c3 100644
--- a/src/cmd/go/testdata/script/README
+++ b/src/cmd/go/testdata/script/README
@@ -28,6 +28,7 @@ Scripts also have access to these other environment variables:
GOARCH=<target GOARCH>
GOCACHE=<actual GOCACHE being used outside the test>
+ GOEXE=<executable file suffix: .exe on Windows, empty on other systems>
GOOS=<target GOOS>
GOPATH=$WORK/gopath
GOPROXY=<local module proxy serving from cmd/go/testdata/mod>
@@ -38,8 +39,6 @@ Scripts also have access to these other environment variables:
devnull=<value of os.DevNull>
goversion=<current Go version; for example, 1.12>
-The environment variable $exe (lowercase) is an empty string on most systems, ".exe" on Windows.
-
The scripts supporting files are unpacked relative to $GOPATH/src (aka $WORK/gopath/src)
and then the script begins execution in that directory as well. Thus the example above runs
in $WORK/gopath/src with GOPATH=$WORK/gopath and $WORK/gopath/src/hello.go