aboutsummaryrefslogtreecommitdiff
path: root/test/nosplit.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2019-03-12 16:28:03 -0400
committerBryan C. Mills <bcmills@google.com>2019-03-12 20:46:29 +0000
commitaf13cfc3a21a56e50f651dd9c1edcb6d30fc6e45 (patch)
tree1dccacc8c56b3c836411198752e320b598c6ffe5 /test/nosplit.go
parent53948127d32cd8ab2d67941542122491a9cd22c9 (diff)
downloadgo-af13cfc3a21a56e50f651dd9c1edcb6d30fc6e45.tar.gz
go-af13cfc3a21a56e50f651dd9c1edcb6d30fc6e45.zip
../test: set GOPATH in nosplit.go
This test invokes 'go build', so in module mode it needs a module cache to guard edits to go.mod. Fixes #30776 Change-Id: I89ebef1fad718247e7f972cd830e31d6f4a83e4c Reviewed-on: https://go-review.googlesource.com/c/go/+/167085 Run-TryBot: Bryan C. Mills <bcmills@google.com> Reviewed-by: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'test/nosplit.go')
-rw-r--r--test/nosplit.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/nosplit.go b/test/nosplit.go
index 46810b1a2f..266e6077b1 100644
--- a/test/nosplit.go
+++ b/test/nosplit.go
@@ -217,6 +217,7 @@ func main() {
return
}
defer os.RemoveAll(dir)
+ os.Setenv("GOPATH", filepath.Join(dir, "_gopath"))
if err := ioutil.WriteFile(filepath.Join(dir, "go.mod"), []byte("module go-test-nosplit\n"), 0666); err != nil {
log.Panic(err)