1
0
mirror of https://github.com/golang/go synced 2024-11-23 18:20:04 -07:00

cmd/go: set GOWORK=off explicitly in script tests that cd to GOROOT

Some folks working on the Go project may have a go.work file in
GOROOT/src in order to test changes in x repos. 'go test cmd/go'
should not fail if that is the case.

For #58767.

Change-Id: I0e57b15fb1d3e4abc4903c177434626c9f125cae
Reviewed-on: https://go-review.googlesource.com/c/go/+/471601
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Bryan C. Mills 2023-02-27 22:24:15 +00:00 committed by Gopher Robot
parent af758177c0
commit 454198ab94
3 changed files with 3 additions and 0 deletions

View File

@ -28,5 +28,6 @@ cmp stdout $WORK/net-deps.txt
[!net] stop
env GOPROXY=
env GOWORK=off
go mod why -m golang.org/x/net
stdout '^# golang.org/x/net\nnet\ngolang.org/x/net'

View File

@ -50,6 +50,7 @@ stderr '^doc: cannot find module providing package example.com/hello: module loo
cd $GOROOT/src
env GOFLAGS=
env GOWORK=off
go doc cryptobyte
stdout '// import "golang.org/x/crypto/cryptobyte"'

View File

@ -36,6 +36,7 @@ stdout ^bytes$
# rules).
cd $GOROOT/src
env GOWORK=off
go list std
stdout ^vendor/golang.org/x/net/http2/hpack