mirror of
https://github.com/golang/go.git
synced 2025-11-10 21:51:05 +00:00
cmd/link: remove GOROOT write in TestBuildForTvOS
Tests should avoid writing to GOROOT when possible. Such writes would fail if GOROOT is non-writeable, and it can interfere with other tests that don't expect GOROOT to change during test execution. Updates #28387. Change-Id: I7d72614f218df3375540f5c2f9c9f8c11034f602 Reviewed-on: https://go-review.googlesource.com/c/go/+/284293 Trust: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
parent
ec9470162f
commit
9f83418b83
1 changed files with 1 additions and 0 deletions
|
|
@ -320,6 +320,7 @@ func TestBuildForTvOS(t *testing.T) {
|
|||
}
|
||||
|
||||
link := exec.Command(CC[0], CC[1:]...)
|
||||
link.Args = append(link.Args, "-o", filepath.Join(tmpDir, "a.out")) // Avoid writing to package directory.
|
||||
link.Args = append(link.Args, ar, filepath.Join("testdata", "testBuildFortvOS", "main.m"))
|
||||
if out, err := link.CombinedOutput(); err != nil {
|
||||
t.Fatalf("%v: %v:\n%s", link.Args, err, out)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue