@@ -482,8 +482,10 @@ impl Miri {
482
482
String :: new ( )
483
483
} else {
484
484
builder. verbose ( || println ! ( "running: {cargo:?}" ) ) ;
485
- let out =
486
- cargo. output ( ) . expect ( "We already ran `cargo miri setup` before and that worked" ) ;
485
+ let out = cargo
486
+ . command
487
+ . output ( )
488
+ . expect ( "We already ran `cargo miri setup` before and that worked" ) ;
487
489
assert ! ( out. status. success( ) , "`cargo miri setup` returned with non-0 exit code" ) ;
488
490
// Output is "<sysroot>\n".
489
491
let stdout = String :: from_utf8 ( out. stdout )
@@ -2067,7 +2069,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
2067
2069
cmd. arg ( "--git-repository" ) . arg ( git_config. git_repository ) ;
2068
2070
cmd. arg ( "--nightly-branch" ) . arg ( git_config. nightly_branch ) ;
2069
2071
2070
- builder. ci_env . force_coloring_in_ci ( & mut cmd) ;
2072
+ // FIXME: Move CiEnv back to bootstrap, it is only used here anyway
2073
+ builder. ci_env . force_coloring_in_ci ( & mut cmd. command ) ;
2071
2074
2072
2075
#[ cfg( feature = "build-metrics" ) ]
2073
2076
builder. metrics . begin_test_suite (
@@ -2426,7 +2429,7 @@ impl Step for CrateLibrustc {
2426
2429
/// Returns whether the test succeeded.
2427
2430
#[ allow( clippy:: too_many_arguments) ] // FIXME: reduce the number of args and remove this.
2428
2431
fn run_cargo_test < ' a > (
2429
- cargo : impl Into < Command > ,
2432
+ cargo : impl Into < BootstrapCommand > ,
2430
2433
libtest_args : & [ & str ] ,
2431
2434
crates : & [ String ] ,
2432
2435
primary_crate : & str ,
@@ -2457,14 +2460,14 @@ fn run_cargo_test<'a>(
2457
2460
2458
2461
/// Given a `cargo test` subcommand, pass it the appropriate test flags given a `builder`.
2459
2462
fn prepare_cargo_test (
2460
- cargo : impl Into < Command > ,
2463
+ cargo : impl Into < BootstrapCommand > ,
2461
2464
libtest_args : & [ & str ] ,
2462
2465
crates : & [ String ] ,
2463
2466
primary_crate : & str ,
2464
2467
compiler : Compiler ,
2465
2468
target : TargetSelection ,
2466
2469
builder : & Builder < ' _ > ,
2467
- ) -> Command {
2470
+ ) -> BootstrapCommand {
2468
2471
let mut cargo = cargo. into ( ) ;
2469
2472
2470
2473
// Propegate `--bless` if it has not already been set/unset
@@ -2977,17 +2980,17 @@ impl Step for Bootstrap {
2977
2980
let compiler = builder. compiler ( 0 , host) ;
2978
2981
let _guard = builder. msg ( Kind :: Test , 0 , "bootstrap" , host, host) ;
2979
2982
2980
- let mut check_bootstrap = Command :: new ( builder. python ( ) ) ;
2983
+ let mut check_bootstrap = BootstrapCommand :: new ( builder. python ( ) ) ;
2981
2984
check_bootstrap
2982
2985
. args ( [ "-m" , "unittest" , "bootstrap_test.py" ] )
2983
2986
. env ( "BUILD_DIR" , & builder. out )
2984
2987
. env ( "BUILD_PLATFORM" , builder. build . build . triple )
2985
2988
. current_dir ( builder. src . join ( "src/bootstrap/" ) ) ;
2986
2989
// NOTE: we intentionally don't pass test_args here because the args for unittest and cargo test are mutually incompatible.
2987
2990
// Use `python -m unittest` manually if you want to pass arguments.
2988
- builder. run ( BootstrapCommand :: from ( & mut check_bootstrap) . delay_failure ( ) ) ;
2991
+ builder. run ( check_bootstrap. delay_failure ( ) ) ;
2989
2992
2990
- let mut cmd = Command :: new ( & builder. initial_cargo ) ;
2993
+ let mut cmd = BootstrapCommand :: new ( & builder. initial_cargo ) ;
2991
2994
cmd. arg ( "test" )
2992
2995
. args ( [ "--features" , "bootstrap-self-test" ] )
2993
2996
. current_dir ( builder. src . join ( "src/bootstrap" ) )
0 commit comments