@@ -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 )
@@ -2065,7 +2067,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
2065
2067
cmd. arg ( "--git-repository" ) . arg ( git_config. git_repository ) ;
2066
2068
cmd. arg ( "--nightly-branch" ) . arg ( git_config. nightly_branch ) ;
2067
2069
2068
- builder. ci_env . force_coloring_in_ci ( & mut cmd) ;
2070
+ // FIXME: Move CiEnv back to bootstrap, it is only used here anyway
2071
+ builder. ci_env . force_coloring_in_ci ( & mut cmd. command ) ;
2069
2072
2070
2073
#[ cfg( feature = "build-metrics" ) ]
2071
2074
builder. metrics . begin_test_suite (
@@ -2424,7 +2427,7 @@ impl Step for CrateLibrustc {
2424
2427
/// Returns whether the test succeeded.
2425
2428
#[ allow( clippy:: too_many_arguments) ] // FIXME: reduce the number of args and remove this.
2426
2429
fn run_cargo_test < ' a > (
2427
- cargo : impl Into < Command > ,
2430
+ cargo : impl Into < BootstrapCommand > ,
2428
2431
libtest_args : & [ & str ] ,
2429
2432
crates : & [ String ] ,
2430
2433
primary_crate : & str ,
@@ -2455,14 +2458,14 @@ fn run_cargo_test<'a>(
2455
2458
2456
2459
/// Given a `cargo test` subcommand, pass it the appropriate test flags given a `builder`.
2457
2460
fn prepare_cargo_test (
2458
- cargo : impl Into < Command > ,
2461
+ cargo : impl Into < BootstrapCommand > ,
2459
2462
libtest_args : & [ & str ] ,
2460
2463
crates : & [ String ] ,
2461
2464
primary_crate : & str ,
2462
2465
compiler : Compiler ,
2463
2466
target : TargetSelection ,
2464
2467
builder : & Builder < ' _ > ,
2465
- ) -> Command {
2468
+ ) -> BootstrapCommand {
2466
2469
let mut cargo = cargo. into ( ) ;
2467
2470
2468
2471
// Propegate `--bless` if it has not already been set/unset
@@ -2978,17 +2981,17 @@ impl Step for Bootstrap {
2978
2981
// Some tests require cargo submodule to be present.
2979
2982
builder. build . update_submodule ( Path :: new ( "src/tools/cargo" ) ) ;
2980
2983
2981
- let mut check_bootstrap = Command :: new ( builder. python ( ) ) ;
2984
+ let mut check_bootstrap = BootstrapCommand :: new ( builder. python ( ) ) ;
2982
2985
check_bootstrap
2983
2986
. args ( [ "-m" , "unittest" , "bootstrap_test.py" ] )
2984
2987
. env ( "BUILD_DIR" , & builder. out )
2985
2988
. env ( "BUILD_PLATFORM" , builder. build . build . triple )
2986
2989
. current_dir ( builder. src . join ( "src/bootstrap/" ) ) ;
2987
2990
// NOTE: we intentionally don't pass test_args here because the args for unittest and cargo test are mutually incompatible.
2988
2991
// Use `python -m unittest` manually if you want to pass arguments.
2989
- builder. run ( BootstrapCommand :: from ( & mut check_bootstrap) . delay_failure ( ) ) ;
2992
+ builder. run ( check_bootstrap. delay_failure ( ) ) ;
2990
2993
2991
- let mut cmd = Command :: new ( & builder. initial_cargo ) ;
2994
+ let mut cmd = BootstrapCommand :: new ( & builder. initial_cargo ) ;
2992
2995
cmd. arg ( "test" )
2993
2996
. args ( [ "--features" , "bootstrap-self-test" ] )
2994
2997
. current_dir ( builder. src . join ( "src/bootstrap" ) )
0 commit comments