Commit 8ef1273
authored
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}.1 parent 50426be commit 8ef1273
File tree
4 files changed
+9
-24
lines changed- cmd
- testscript/testdata
- txtar-addmod
- gotooltest
- testdata
4 files changed
+9
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
| |||
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
115 | 106 | | |
116 | 107 | | |
117 | 108 | | |
| |||
140 | 131 | | |
141 | 132 | | |
142 | 133 | | |
143 | | - | |
| 134 | + | |
144 | 135 | | |
145 | 136 | | |
146 | 137 | | |
147 | 138 | | |
148 | 139 | | |
149 | | - | |
| 140 | + | |
150 | 141 | | |
151 | 142 | | |
152 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | | - | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
68 | 66 | | |
69 | 67 | | |
70 | | - | |
| 68 | + | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
| |||
140 | 138 | | |
141 | 139 | | |
142 | 140 | | |
143 | | - | |
144 | 141 | | |
145 | 142 | | |
146 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | | - | |
0 commit comments