-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "gotooltest: proxy the new GOMODCACHE env var too" (#136)
We started making gotooltest share the host's module download cache with test scripts, since we did it with GOCACHE and it initially made sense. However, the upside is significantly smaller for GOMODCACHE compared to GOCACHE. The build cache can save a significant amount of time, since many tools have to load or build Go packages as part of their tests. In contrast, few tests download modules, and those which do tend to download those modules from a local proxy like goproxytest, which is very fast already. The downsides of sharing the module download cache are a few: * We don't share GOPATH, and since the default GOMODCACHE is GOPATH/pkg/mod, sharing one and not the other is unexpected and inconsistent. * Upstream testscript shares GOCACHE, but does not share GOMODCACHE. See golang/go#42017. * Losing a degree of isolation in the tests is a downside in itself, especially given that sharing GOMODCACHE isn't crucial. This reverts commit c5fd45a. Note that we keep the env.txt test in place, just flipping the expectation that GOMODCACHE does not contain ${WORK}.
- Loading branch information
Showing
4 changed files
with
9 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# GOPATH should point inside the temporary work directory, but GOCACHE and | ||
# GOMODCACHE should not, as they should reuse the host's. | ||
# GOPATH and GOMODCACHE are not shared with the host, | ||
# but GOCACHE is. | ||
go env | ||
stdout GOPATH=.*${WORK@R} | ||
stdout GOMODCACHE=.*${WORK@R} | ||
! stdout GOCACHE=.*${WORK@R} | ||
! stdout GOMODCACHE=.*${WORK@R} |