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:
parent
af758177c0
commit
454198ab94
@ -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'
|
||||
|
1
src/cmd/go/testdata/script/mod_doc.txt
vendored
1
src/cmd/go/testdata/script/mod_doc.txt
vendored
@ -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"'
|
||||
|
||||
|
1
src/cmd/go/testdata/script/mod_list_std.txt
vendored
1
src/cmd/go/testdata/script/mod_list_std.txt
vendored
@ -36,6 +36,7 @@ stdout ^bytes$
|
||||
# rules).
|
||||
|
||||
cd $GOROOT/src
|
||||
env GOWORK=off
|
||||
|
||||
go list std
|
||||
stdout ^vendor/golang.org/x/net/http2/hpack
|
||||
|
Loading…
Reference in New Issue
Block a user