]> Cypherpunks repositories - gostls13.git/commit
cmd/go: use build cache for tests when GOCACHE is unset
authorRuss Cox <rsc@golang.org>
Tue, 12 Jun 2018 20:05:29 +0000 (16:05 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 12 Jun 2018 20:31:40 +0000 (20:31 +0000)
commitf7142206e95f7b7bf880d8819341718b9adef7dd
tree14d185e6b3292bf50336beb563832e841346ab11
parent44b826bb28171c473cf906413c298f3095c86451
cmd/go: use build cache for tests when GOCACHE is unset

Before this CL, if you had GOCACHE=/some/dir, then the cmd/go tests used it.
But if you were relying on the implicit behavior that GOCACHE being empty
meant an appropriate system-specific cache directory, then the cmd/go tests
ran with no cache at all, which makes them about 4X slower.

During all.bash GOCACHE is set to a fresh temporary directory and is therefore
already getting proper caching; this CL mainly helps people running 'go test cmd/go'
by hand.

Change-Id: I7c322ca79b877c1d0a3b448b95d5354fbfcba7f8
Reviewed-on: https://go-review.googlesource.com/118320
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/go_test.go