|
The check routine overrides $HOME to somewhere within the build root to
avoid user configuration impacting git commands ran by the tests, which
is the suggested method for eliminating user configuration by `man git`:
GIT_CONFIG_NOSYSTEM
Whether to skip reading settings from the system-wide
$(prefix)/etc/gitconfig file. This environment variable can be used
along with $HOME and $XDG_CONFIG_HOME to create a predictable
environment for a picky script, [...]
However, a side effect of setting $HOME was that go now downloaded
dependencies relative to the build root instead of using the same cache
as the build routine. That in itself is unfortunate, but even worse,
since we happened to set it somewhere in the go project `go test ./...`
would no longer be idempotent, because it would locate new tests (ones
from downloaded dependencies) on each subsequent runs.
|