Skip to content

Commit 454198a

Browse files
Bryan C. Millsgopherbot
Bryan C. Mills
authored andcommitted
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>
1 parent af75817 commit 454198a

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/cmd/go/testdata/script/list_std_vendor.txt

+1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ cmp stdout $WORK/net-deps.txt
2828
[!net] stop
2929

3030
env GOPROXY=
31+
env GOWORK=off
3132
go mod why -m golang.org/x/net
3233
stdout '^# golang.org/x/net\nnet\ngolang.org/x/net'

src/cmd/go/testdata/script/mod_doc.txt

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ stderr '^doc: cannot find module providing package example.com/hello: module loo
5050

5151
cd $GOROOT/src
5252
env GOFLAGS=
53+
env GOWORK=off
5354
go doc cryptobyte
5455
stdout '// import "golang.org/x/crypto/cryptobyte"'
5556

src/cmd/go/testdata/script/mod_list_std.txt

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ stdout ^bytes$
3636
# rules).
3737

3838
cd $GOROOT/src
39+
env GOWORK=off
3940

4041
go list std
4142
stdout ^vendor/golang.org/x/net/http2/hpack

0 commit comments

Comments
 (0)