cmd/go: set GO111MODULE=off explicitly in tests that assume GOPATH mode
We will soon switch GO111MODULE to 'on' by default, and when that
happens these tests will otherwise break.
Updates #30228
Change-Id: I1016d429b1dfb889d1aae8bc86fb2567cf0fc56f
Reviewed-on: https://go-review.googlesource.com/c/162697
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go
index c58bc74..866241b 100644
--- a/src/cmd/go/go_test.go
+++ b/src/cmd/go/go_test.go
@@ -394,6 +394,7 @@
func (tg *testgoData) unsetenv(name string) {
if tg.env == nil {
tg.env = append([]string(nil), os.Environ()...)
+ tg.env = append(tg.env, "GO111MODULE=off")
}
for i, v := range tg.env {
if strings.HasPrefix(v, name+"=") {
diff --git a/src/cmd/go/testdata/script/binary_only.txt b/src/cmd/go/testdata/script/binary_only.txt
index 397904e..1842d8c 100644
--- a/src/cmd/go/testdata/script/binary_only.txt
+++ b/src/cmd/go/testdata/script/binary_only.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# check that error for missing binary-only says where it should be
! go build b
stderr pkg[\\/].*a\.a
diff --git a/src/cmd/go/testdata/script/build_GOTMPDIR.txt b/src/cmd/go/testdata/script/build_GOTMPDIR.txt
index ea06dcc..da54ced 100644
--- a/src/cmd/go/testdata/script/build_GOTMPDIR.txt
+++ b/src/cmd/go/testdata/script/build_GOTMPDIR.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Set GOCACHE to a clean directory to ensure that 'go build' has work to report.
env GOCACHE=$WORK/gocache
diff --git a/src/cmd/go/testdata/script/build_cache_compile.txt b/src/cmd/go/testdata/script/build_cache_compile.txt
index 7db881a..04a6f9a 100644
--- a/src/cmd/go/testdata/script/build_cache_compile.txt
+++ b/src/cmd/go/testdata/script/build_cache_compile.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Set up fresh GOCACHE.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE
diff --git a/src/cmd/go/testdata/script/build_cache_gomips.txt b/src/cmd/go/testdata/script/build_cache_gomips.txt
index c77acc3..3218354 100644
--- a/src/cmd/go/testdata/script/build_cache_gomips.txt
+++ b/src/cmd/go/testdata/script/build_cache_gomips.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Set up fresh GOCACHE.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE
diff --git a/src/cmd/go/testdata/script/build_cache_link.txt b/src/cmd/go/testdata/script/build_cache_link.txt
index 61e7ee4..658bb88 100644
--- a/src/cmd/go/testdata/script/build_cache_link.txt
+++ b/src/cmd/go/testdata/script/build_cache_link.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Set up fresh GOCACHE.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE
diff --git a/src/cmd/go/testdata/script/build_cache_output.txt b/src/cmd/go/testdata/script/build_cache_output.txt
index ee4099e..41c84ac 100644
--- a/src/cmd/go/testdata/script/build_cache_output.txt
+++ b/src/cmd/go/testdata/script/build_cache_output.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[!gc] skip
# Set up fresh GOCACHE.
diff --git a/src/cmd/go/testdata/script/build_nocache.txt b/src/cmd/go/testdata/script/build_nocache.txt
index 5aa46e0..46e95fa 100644
--- a/src/cmd/go/testdata/script/build_nocache.txt
+++ b/src/cmd/go/testdata/script/build_nocache.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# As of Go 1.12, the module cache is required.
# If none of the variables we use to locate GOCACHE are set, the cache is off
diff --git a/src/cmd/go/testdata/script/build_relative_pkgdir.txt b/src/cmd/go/testdata/script/build_relative_pkgdir.txt
index 76098a0..0716bcd 100644
--- a/src/cmd/go/testdata/script/build_relative_pkgdir.txt
+++ b/src/cmd/go/testdata/script/build_relative_pkgdir.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Regression test for golang.org/issue/21309: accept relative -pkgdir argument.
[short] skip
diff --git a/src/cmd/go/testdata/script/build_relative_tmpdir.txt b/src/cmd/go/testdata/script/build_relative_tmpdir.txt
index 9490a28..3e98a67 100644
--- a/src/cmd/go/testdata/script/build_relative_tmpdir.txt
+++ b/src/cmd/go/testdata/script/build_relative_tmpdir.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# If GOTMPDIR is relative, 'go build' should derive an absolute $WORK directory.
cd $WORK
mkdir tmp
diff --git a/src/cmd/go/testdata/script/build_runtime_gcflags.txt b/src/cmd/go/testdata/script/build_runtime_gcflags.txt
index 767b768..5354a73 100644
--- a/src/cmd/go/testdata/script/build_runtime_gcflags.txt
+++ b/src/cmd/go/testdata/script/build_runtime_gcflags.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Set up fresh GOCACHE.
env GOCACHE=$WORK/gocache
mkdir $GOCACHE
diff --git a/src/cmd/go/testdata/script/cache_unix.txt b/src/cmd/go/testdata/script/cache_unix.txt
index f700ebe..0e07ba6 100644
--- a/src/cmd/go/testdata/script/cache_unix.txt
+++ b/src/cmd/go/testdata/script/cache_unix.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Integration test for cache directory calculation (cmd/go/internal/cache).
[windows] skip
diff --git a/src/cmd/go/testdata/script/cgo_syso_issue29253.txt b/src/cmd/go/testdata/script/cgo_syso_issue29253.txt
index 0d18fa9..9825d1e 100644
--- a/src/cmd/go/testdata/script/cgo_syso_issue29253.txt
+++ b/src/cmd/go/testdata/script/cgo_syso_issue29253.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# This test tests that we can link in-package syso files that provides symbols
# for cgo. See issue 29253.
[!cgo] stop
diff --git a/src/cmd/go/testdata/script/clean_testcache.txt b/src/cmd/go/testdata/script/clean_testcache.txt
index a2d592d..5ac968b 100644
--- a/src/cmd/go/testdata/script/clean_testcache.txt
+++ b/src/cmd/go/testdata/script/clean_testcache.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# go clean -testcache
# should work (see golang.org/issue/29757).
cd x
diff --git a/src/cmd/go/testdata/script/cover_atomic_pkgall.txt b/src/cmd/go/testdata/script/cover_atomic_pkgall.txt
index c122c05..c3bc67d 100644
--- a/src/cmd/go/testdata/script/cover_atomic_pkgall.txt
+++ b/src/cmd/go/testdata/script/cover_atomic_pkgall.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[short] skip
go test -coverpkg=all -covermode=atomic x
diff --git a/src/cmd/go/testdata/script/cover_pkgall_runtime.txt b/src/cmd/go/testdata/script/cover_pkgall_runtime.txt
index 5d169d6..9927c30 100644
--- a/src/cmd/go/testdata/script/cover_pkgall_runtime.txt
+++ b/src/cmd/go/testdata/script/cover_pkgall_runtime.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Issue 23882
[short] skip
diff --git a/src/cmd/go/testdata/script/cpu_profile_twice.txt b/src/cmd/go/testdata/script/cpu_profile_twice.txt
index 142d5ee..38d6439 100644
--- a/src/cmd/go/testdata/script/cpu_profile_twice.txt
+++ b/src/cmd/go/testdata/script/cpu_profile_twice.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Issue 23150
[short] skip
diff --git a/src/cmd/go/testdata/script/fileline.txt b/src/cmd/go/testdata/script/fileline.txt
index cdc3be2..5cb35f0 100644
--- a/src/cmd/go/testdata/script/fileline.txt
+++ b/src/cmd/go/testdata/script/fileline.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# look for short, relative file:line in error message
! go run ../../gopath/x/y/z/err.go
stderr ^..[\\/]x[\\/]y[\\/]z[\\/]err.go:
diff --git a/src/cmd/go/testdata/script/gcflags_patterns.txt b/src/cmd/go/testdata/script/gcflags_patterns.txt
index 40f80b7..f2e6e2b 100644
--- a/src/cmd/go/testdata/script/gcflags_patterns.txt
+++ b/src/cmd/go/testdata/script/gcflags_patterns.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[!gc] skip 'using -gcflags and -ldflags'
# -gcflags=-e applies to named packages, not dependencies
diff --git a/src/cmd/go/testdata/script/get_brace.txt b/src/cmd/go/testdata/script/get_brace.txt
index be81d8f..3449a0c 100644
--- a/src/cmd/go/testdata/script/get_brace.txt
+++ b/src/cmd/go/testdata/script/get_brace.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[!exec:git] skip
# Set up some empty repositories.
diff --git a/src/cmd/go/testdata/script/get_dotfiles.txt b/src/cmd/go/testdata/script/get_dotfiles.txt
index 1876114..38a3fac 100644
--- a/src/cmd/go/testdata/script/get_dotfiles.txt
+++ b/src/cmd/go/testdata/script/get_dotfiles.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[!exec:git] skip
# Set up a benign repository and a repository with a dotfile name.
diff --git a/src/cmd/go/testdata/script/get_tilde.txt b/src/cmd/go/testdata/script/get_tilde.txt
index 08289ca..6d18174 100644
--- a/src/cmd/go/testdata/script/get_tilde.txt
+++ b/src/cmd/go/testdata/script/get_tilde.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Paths containing windows short names should be rejected before attempting to fetch.
! go get example.com/longna~1.dir/thing
stderr 'trailing tilde and digits'
diff --git a/src/cmd/go/testdata/script/get_unicode.txt b/src/cmd/go/testdata/script/get_unicode.txt
index 31edcdb..ab1b914 100644
--- a/src/cmd/go/testdata/script/get_unicode.txt
+++ b/src/cmd/go/testdata/script/get_unicode.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[!exec:git] skip
# Construct a repository that imports a non-ASCII path.
diff --git a/src/cmd/go/testdata/script/get_with_git_trace.txt b/src/cmd/go/testdata/script/get_with_git_trace.txt
index 93341a3..98854c7 100644
--- a/src/cmd/go/testdata/script/get_with_git_trace.txt
+++ b/src/cmd/go/testdata/script/get_with_git_trace.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
env GIT_TRACE=1
[!net] skip
diff --git a/src/cmd/go/testdata/script/goflags.txt b/src/cmd/go/testdata/script/goflags.txt
index 20de325..fac6d80 100644
--- a/src/cmd/go/testdata/script/goflags.txt
+++ b/src/cmd/go/testdata/script/goflags.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# GOFLAGS sets flags for commands
env GOFLAGS='-e -f={{.Dir}} --test.benchtime=1s -count=10'
diff --git a/src/cmd/go/testdata/script/help.txt b/src/cmd/go/testdata/script/help.txt
index 9f45525..e6cbc82 100644
--- a/src/cmd/go/testdata/script/help.txt
+++ b/src/cmd/go/testdata/script/help.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# go help shows overview.
go help
stdout 'Go is a tool'
diff --git a/src/cmd/go/testdata/script/install_cleans_build.txt b/src/cmd/go/testdata/script/install_cleans_build.txt
index b8d322d..7f1b917 100644
--- a/src/cmd/go/testdata/script/install_cleans_build.txt
+++ b/src/cmd/go/testdata/script/install_cleans_build.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# 'go install' with no arguments should clean up after go build
cd mycmd
go build
diff --git a/src/cmd/go/testdata/script/install_cross_gobin.txt b/src/cmd/go/testdata/script/install_cross_gobin.txt
index 587081f..d9ab35c 100644
--- a/src/cmd/go/testdata/script/install_cross_gobin.txt
+++ b/src/cmd/go/testdata/script/install_cross_gobin.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
cd mycmd
go build mycmd
diff --git a/src/cmd/go/testdata/script/install_rebuild_gopath.txt b/src/cmd/go/testdata/script/install_rebuild_gopath.txt
index d42b070..14a6c86 100644
--- a/src/cmd/go/testdata/script/install_rebuild_gopath.txt
+++ b/src/cmd/go/testdata/script/install_rebuild_gopath.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# GOPATH with p1 in d1, p2 in d2
env GOPATH=$WORK/d1${:}$WORK/d2
diff --git a/src/cmd/go/testdata/script/install_rebuild_removed.txt b/src/cmd/go/testdata/script/install_rebuild_removed.txt
index e7620a0..5db3778 100644
--- a/src/cmd/go/testdata/script/install_rebuild_removed.txt
+++ b/src/cmd/go/testdata/script/install_rebuild_removed.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# go command should detect package staleness as source file set changes
go install mypkg
! stale mypkg
diff --git a/src/cmd/go/testdata/script/linkname.txt b/src/cmd/go/testdata/script/linkname.txt
index e2ec00c..1133659 100644
--- a/src/cmd/go/testdata/script/linkname.txt
+++ b/src/cmd/go/testdata/script/linkname.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# check for linker name in error message about linker crash
[!gc] skip
! go build -ldflags=-crash_for_testing x.go
diff --git a/src/cmd/go/testdata/script/list_bad_import.txt b/src/cmd/go/testdata/script/list_bad_import.txt
index 3d9cac0..958c576 100644
--- a/src/cmd/go/testdata/script/list_bad_import.txt
+++ b/src/cmd/go/testdata/script/list_bad_import.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# This test matches mod_list_bad_import, but in GOPATH mode.
# Please keep them in sync.
diff --git a/src/cmd/go/testdata/script/list_compiled_imports.txt b/src/cmd/go/testdata/script/list_compiled_imports.txt
index e6f5abb..7780b07 100644
--- a/src/cmd/go/testdata/script/list_compiled_imports.txt
+++ b/src/cmd/go/testdata/script/list_compiled_imports.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[!cgo] skip
# go list should report import "C"
diff --git a/src/cmd/go/testdata/script/list_find.txt b/src/cmd/go/testdata/script/list_find.txt
index 63c6896..aaac658 100644
--- a/src/cmd/go/testdata/script/list_find.txt
+++ b/src/cmd/go/testdata/script/list_find.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# go list -find should not report imports
go list -f {{.Incomplete}} x/y/z... # should probably exit non-zero but never has
diff --git a/src/cmd/go/testdata/script/list_importmap.txt b/src/cmd/go/testdata/script/list_importmap.txt
index a42dc47..52ee602 100644
--- a/src/cmd/go/testdata/script/list_importmap.txt
+++ b/src/cmd/go/testdata/script/list_importmap.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# gccgo does not have standard packages.
[gccgo] skip
diff --git a/src/cmd/go/testdata/script/list_std.txt b/src/cmd/go/testdata/script/list_std.txt
index 046bec6..88a659f 100644
--- a/src/cmd/go/testdata/script/list_std.txt
+++ b/src/cmd/go/testdata/script/list_std.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[!gc] skip
# listing GOROOT should only find standard packages
diff --git a/src/cmd/go/testdata/script/list_tags.txt b/src/cmd/go/testdata/script/list_tags.txt
index c5dc99e..49069bd 100644
--- a/src/cmd/go/testdata/script/list_tags.txt
+++ b/src/cmd/go/testdata/script/list_tags.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# go list supports -tags
go list -tags=thetag ./my...
stdout mypkg
diff --git a/src/cmd/go/testdata/script/list_test_e.txt b/src/cmd/go/testdata/script/list_test_e.txt
index f147332..4e36b88 100644
--- a/src/cmd/go/testdata/script/list_test_e.txt
+++ b/src/cmd/go/testdata/script/list_test_e.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# issue 25980: crash in go list -e -test
go list -e -test -f '{{.Error}}' p
stdout '^p[/\\]d_test.go:2:8: cannot find package "d" in any of:'
diff --git a/src/cmd/go/testdata/script/list_test_imports.txt b/src/cmd/go/testdata/script/list_test_imports.txt
index 51d1ce9..b2a6bc4 100644
--- a/src/cmd/go/testdata/script/list_test_imports.txt
+++ b/src/cmd/go/testdata/script/list_test_imports.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# issue 26880: list with tests has wrong variant in imports
go list -test -f '{{.ImportPath}}:{{with .Imports}} {{join . ", "}}{{end}}' a b
cmp stdout imports.txt
diff --git a/src/cmd/go/testdata/script/mod_find.txt b/src/cmd/go/testdata/script/mod_find.txt
index eb7f974..703a88e 100644
--- a/src/cmd/go/testdata/script/mod_find.txt
+++ b/src/cmd/go/testdata/script/mod_find.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=auto
+
# Derive module path from import comment.
cd $WORK/x
exists x.go
diff --git a/src/cmd/go/testdata/script/mod_gobuild_import.txt b/src/cmd/go/testdata/script/mod_gobuild_import.txt
index 932b8b6..d2d1645 100644
--- a/src/cmd/go/testdata/script/mod_gobuild_import.txt
+++ b/src/cmd/go/testdata/script/mod_gobuild_import.txt
@@ -7,14 +7,12 @@
! exec $WORK/testimport.exe x/y/z/w .
# GO111MODULE=auto in GOPATH/src
-env GO111MODULE=
-! exec $WORK/testimport.exe x/y/z/w .
env GO111MODULE=auto
! exec $WORK/testimport.exe x/y/z/w .
# GO111MODULE=auto outside GOPATH/src
cd $GOPATH/other
-env GO111MODULE=
+env GO111MODULE=auto
exec $WORK/testimport.exe other/x/y/z/w .
stdout w2.go
@@ -22,7 +20,6 @@
stderr 'cannot find module providing package x/y/z/w'
cd z
-env GO111MODULE=auto
exec $WORK/testimport.exe other/x/y/z/w .
stdout w2.go
@@ -33,6 +30,7 @@
# GO111MODULE=on in GOPATH/src
cd $GOPATH/src
+env GO111MODULE=on
exec $WORK/testimport.exe x/y/z/w .
stdout w1.go
cd w
diff --git a/src/cmd/go/testdata/script/pattern_syntax_error.txt b/src/cmd/go/testdata/script/pattern_syntax_error.txt
index 8e6549b..9a1f5e52 100644
--- a/src/cmd/go/testdata/script/pattern_syntax_error.txt
+++ b/src/cmd/go/testdata/script/pattern_syntax_error.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# patterns match directories with syntax errors
! go list ./...
! go build ./...
diff --git a/src/cmd/go/testdata/script/run_hello.txt b/src/cmd/go/testdata/script/run_hello.txt
index 8c4c1c1..939b661 100644
--- a/src/cmd/go/testdata/script/run_hello.txt
+++ b/src/cmd/go/testdata/script/run_hello.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# hello world
go run hello.go
stderr 'hello world'
diff --git a/src/cmd/go/testdata/script/run_wildcard.txt b/src/cmd/go/testdata/script/run_wildcard.txt
index cd401e0..72036d1 100644
--- a/src/cmd/go/testdata/script/run_wildcard.txt
+++ b/src/cmd/go/testdata/script/run_wildcard.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Fix for https://github.com/golang/go/issues/28696:
# go run x/... should not panic when directory x doesn't exist.
diff --git a/src/cmd/go/testdata/script/script_wait.txt b/src/cmd/go/testdata/script/script_wait.txt
index 0770b39..3cd4ded 100644
--- a/src/cmd/go/testdata/script/script_wait.txt
+++ b/src/cmd/go/testdata/script/script_wait.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
[!exec:echo] skip
[!exec:false] skip
diff --git a/src/cmd/go/testdata/script/test_badtest.txt b/src/cmd/go/testdata/script/test_badtest.txt
index 42fcfed..f5db694 100644
--- a/src/cmd/go/testdata/script/test_badtest.txt
+++ b/src/cmd/go/testdata/script/test_badtest.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
! go test badtest/...
! stdout ^ok
stdout ^FAIL\tbadtest/badexec
diff --git a/src/cmd/go/testdata/script/test_compile_binary.txt b/src/cmd/go/testdata/script/test_compile_binary.txt
index 6c01bc5..6562f24 100644
--- a/src/cmd/go/testdata/script/test_compile_binary.txt
+++ b/src/cmd/go/testdata/script/test_compile_binary.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
! go test -c compile_binary/...
stderr 'build comment'
diff --git a/src/cmd/go/testdata/script/test_devnull.txt b/src/cmd/go/testdata/script/test_devnull.txt
index c414e59..e7ebda3 100644
--- a/src/cmd/go/testdata/script/test_devnull.txt
+++ b/src/cmd/go/testdata/script/test_devnull.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# go test -c -o NUL
# should work (see golang.org/issue/28035).
cd x
diff --git a/src/cmd/go/testdata/script/vendor_complex.txt b/src/cmd/go/testdata/script/vendor_complex.txt
index 6513451..9ca94e7 100644
--- a/src/cmd/go/testdata/script/vendor_complex.txt
+++ b/src/cmd/go/testdata/script/vendor_complex.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# smoke test for complex build configuration
go build -o complex.exe complex
[exec:gccgo] go build -compiler=gccgo -o complex.exe complex
diff --git a/src/cmd/go/testdata/script/vet_asm.txt b/src/cmd/go/testdata/script/vet_asm.txt
index 807e2b7..ea920ea 100644
--- a/src/cmd/go/testdata/script/vet_asm.txt
+++ b/src/cmd/go/testdata/script/vet_asm.txt
@@ -1,3 +1,5 @@
+env GO111MODULE=off
+
# Issue 27665. Verify that "go vet" analyzes non-Go files.
env GOOS=linux