mirror of
https://github.com/golang/go
synced 2024-11-23 15:10:12 -07:00
cmd/go: disable implicit $GOCACHE when clearing $HOME in test
Change-Id: Ie9967c8aaf7cf2e90a442937df21b1218f7ae26f Reviewed-on: https://go-review.googlesource.com/75472 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
3392c0711d
commit
5e35954a8c
@ -155,6 +155,9 @@ func TestMain(m *testing.M) {
|
||||
os.Setenv("CCACHE_DIR", filepath.Join(home, ".ccache"))
|
||||
}
|
||||
os.Setenv("HOME", "/test-go-home-does-not-exist")
|
||||
if os.Getenv("GOCACHE") == "" {
|
||||
os.Setenv("GOCACHE", "off") // because $HOME is gone
|
||||
}
|
||||
|
||||
r := m.Run()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user