cargo test suite fails if default branch is not master #8863
Labels
A-git
Area: anything dealing with git
A-testing-cargo-itself
Area: cargo's tests
C-bug
Category: bug
Problem
Running
cargo test
in the cargo repository fails many tests if the user has set the default branch to something other thanmaster
.Steps
Possible Solution(s)
When using Git in a test suite, it's necessary to set
HOME
to a controlled location and to also setGIT_CONFIG_NOSYSTEM
to avoid reading the system configuration file; otherwise, the global or system configuration files can break tests. Cargo probably needs to set these values during setup in the test suite; this is probably not the only configuration option that will have the effect of breaking tests.Notes
Output of
cargo version
:(Note that this is not the version being tested, about which this report is being made.)
Debian GNU Linux amd64/sid, rustc 1.47.0, cargo repository revision 2af662e.
The text was updated successfully, but these errors were encountered: