]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: set GOWORK=off explicitly in script tests that cd to GOROOT
authorBryan C. Mills <bcmills@google.com>
Mon, 27 Feb 2023 22:24:15 +0000 (22:24 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 28 Feb 2023 18:50:20 +0000 (18:50 +0000)
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>
src/cmd/go/testdata/script/list_std_vendor.txt
src/cmd/go/testdata/script/mod_doc.txt
src/cmd/go/testdata/script/mod_list_std.txt

index 8f27cc1e8d80fa76037b0ef29a454118304d0bc1..923e95799daf4b83289d5f75fe94e2c1625b45ad 100644 (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'
index 595ad679fc0866e7c201c64dafabb709b9cba529..bf0a19d770bfb55fed9839ba36406492c399401b 100644 (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"'
 
index cd95b6ad4d626d06172a58ba14521db40c8a64a9..7a4fe2182311c6f830d0c6ad1afd20afc7cacd08 100644 (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