diff options
author | Bryan C. Mills <bcmills@google.com> | 2019-11-20 14:43:04 -0500 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2019-11-20 22:38:34 +0000 |
commit | 39a9cb4b5dbf1e518b0c66fa3a7b4175f90226fc (patch) | |
tree | 8a6ed385d8b386ed532be9ec9e70f16904864bd5 /misc | |
parent | be0471880d128f7c98efec28c0f3114075e74918 (diff) | |
download | go-git-39a9cb4b5dbf1e518b0c66fa3a7b4175f90226fc.tar.gz |
misc/cgo/testplugin: avoid writing to GOROOT
One of the 'go build' commands executed by this test passed the '-i'
flag, which caused the 'go' command to attempt to install transitive
standard-library dependencies to GOROOT/pkg/$GOOS_$GOARCH_dynlink.
That failed if GOROOT/pkg was not writable (for example, if GOROOT was
owned by the root user, but the user running the test was not root).
As far as I can tell the '-i' flag is not necessary in this test.
Prior to the introduction of the build cache it may have been an
optimization, but now that the build cache is required the '-i' flag
only adds extra work.
Updates #30316
Change-Id: Ib60080a008c1941aa92b5bdd5a194d89fd6202aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/208120
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cgo/testplugin/plugin_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/cgo/testplugin/plugin_test.go b/misc/cgo/testplugin/plugin_test.go index bf7abcbd69..ab98f61c0a 100644 --- a/misc/cgo/testplugin/plugin_test.go +++ b/misc/cgo/testplugin/plugin_test.go @@ -70,7 +70,7 @@ func testMain(m *testing.M) int { os.Setenv("LD_LIBRARY_PATH", modRoot) - goCmd(nil, "build", "-i", "-buildmode=plugin", "./plugin1") + goCmd(nil, "build", "-buildmode=plugin", "./plugin1") goCmd(nil, "build", "-buildmode=plugin", "./plugin2") so, err := ioutil.ReadFile("plugin2.so") if err != nil { |