]> Cypherpunks.ru repositories - gostls13.git/commitdiff
../test: set GOPATH in nosplit.go
authorBryan C. Mills <bcmills@google.com>
Tue, 12 Mar 2019 20:28:03 +0000 (16:28 -0400)
committerBryan C. Mills <bcmills@google.com>
Tue, 12 Mar 2019 20:46:29 +0000 (20:46 +0000)
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>

test/nosplit.go

index 46810b1a2f8f94b9bf94975463307356937b7ab8..266e6077b1f23a025de063aa55ff0d882cb4ea8c 100644 (file)
@@ -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)