@@ -1234,28 +1234,34 @@ pub trait TestEnv: Sized {
1234
1234
. env ( "__CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS" , "stable" )
1235
1235
// Keeps cargo within its sandbox.
1236
1236
. env ( "__CARGO_TEST_DISABLE_GLOBAL_KNOWN_HOST" , "1" )
1237
- // For now disable incremental by default as support hasn't ridden to the
1238
- // stable channel yet. Once incremental support hits the stable compiler we
1239
- // can switch this to one and then fix the tests .
1237
+ // Incremental generates a huge amount of data per test, which we
1238
+ // don't particularly need. Tests that specifically need to check
1239
+ // the incremental behavior should turn this back on .
1240
1240
. env ( "CARGO_INCREMENTAL" , "0" )
1241
+ // Don't read the system git config which is out of our control.
1242
+ . env ( "GIT_CONFIG_NOSYSTEM" , "1" )
1241
1243
. env_remove ( "__CARGO_DEFAULT_LIB_METADATA" )
1242
- . env_remove ( "RUSTC" )
1243
- . env_remove ( "RUSTDOC" )
1244
- . env_remove ( "RUSTC_WRAPPER" )
1245
- . env_remove ( "RUSTFLAGS" )
1246
- . env_remove ( "RUSTDOCFLAGS" )
1247
- . env_remove ( "XDG_CONFIG_HOME" ) // see #2345
1248
- . env ( "GIT_CONFIG_NOSYSTEM" , "1" ) // keep trying to sandbox ourselves
1244
+ . env_remove ( "ALL_PROXY" )
1249
1245
. env_remove ( "EMAIL" )
1250
- . env_remove ( "USER" ) // not set on some rust-lang docker images
1251
- . env_remove ( "MFLAGS" )
1252
- . env_remove ( "MAKEFLAGS" )
1253
- . env_remove ( "GIT_AUTHOR_NAME" )
1254
1246
. env_remove ( "GIT_AUTHOR_EMAIL" )
1255
- . env_remove ( "GIT_COMMITTER_NAME " )
1247
+ . env_remove ( "GIT_AUTHOR_NAME " )
1256
1248
. env_remove ( "GIT_COMMITTER_EMAIL" )
1249
+ . env_remove ( "GIT_COMMITTER_NAME" )
1250
+ . env_remove ( "http_proxy" )
1251
+ . env_remove ( "HTTPS_PROXY" )
1252
+ . env_remove ( "https_proxy" )
1253
+ . env_remove ( "MAKEFLAGS" )
1254
+ . env_remove ( "MFLAGS" )
1255
+ . env_remove ( "MSYSTEM" ) // assume cmd.exe everywhere on windows
1256
+ . env_remove ( "RUSTC" )
1257
+ . env_remove ( "RUSTC_WORKSPACE_WRAPPER" )
1258
+ . env_remove ( "RUSTC_WRAPPER" )
1259
+ . env_remove ( "RUSTDOC" )
1260
+ . env_remove ( "RUSTDOCFLAGS" )
1261
+ . env_remove ( "RUSTFLAGS" )
1257
1262
. env_remove ( "SSH_AUTH_SOCK" ) // ensure an outer agent is never contacted
1258
- . env_remove ( "MSYSTEM" ) ; // assume cmd.exe everywhere on windows
1263
+ . env_remove ( "USER" ) // not set on some rust-lang docker images
1264
+ . env_remove ( "XDG_CONFIG_HOME" ) ; // see #2345
1259
1265
if cfg ! ( target_os = "macos" ) {
1260
1266
// Work-around a bug in macOS 10.15, see `link_or_copy` for details.
1261
1267
self = self . env ( "__CARGO_COPY_DONT_LINK_DO_NOT_USE_THIS" , "1" ) ;
0 commit comments