Commit 5e35954a authored by Russ Cox's avatar Russ Cox

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
parent 3392c071
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment