From: Josh Triplett Date: Wed, 1 Mar 2017 23:50:15 +0000 (-0800) Subject: tests: Insulate from user git environment X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~9^2~119^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0a4214c68be8d6ca02fd68e5ebfe091b80fed248;p=cargo.git tests: Insulate from user git environment Several tests in "cargo test" would fail if the user had any of the Git environment variables set for name or email address, because those environment variables would override the tested configuration. Filter out those environment variables. --- diff --git a/tests/cargotest/lib.rs b/tests/cargotest/lib.rs index 11df25fdd..5e8e7f5cb 100644 --- a/tests/cargotest/lib.rs +++ b/tests/cargotest/lib.rs @@ -55,6 +55,11 @@ fn _process(t: &OsStr) -> cargo::util::ProcessBuilder { .env_remove("CARGO_INCREMENTAL") .env_remove("XDG_CONFIG_HOME") // see #2345 .env("GIT_CONFIG_NOSYSTEM", "1") // keep trying to sandbox ourselves + .env_remove("EMAIL") + .env_remove("GIT_AUTHOR_NAME") + .env_remove("GIT_AUTHOR_EMAIL") + .env_remove("GIT_COMMITTER_NAME") + .env_remove("GIT_COMMITTER_EMAIL") .env_remove("CARGO_TARGET_DIR") // we assume 'target' .env_remove("MSYSTEM"); // assume cmd.exe everywhere on windows