diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index 9917d5b7e5002..155da24691412 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -2320,7 +2320,7 @@ impl Step for ErrorIndex { builder.msg(Kind::Test, compiler.stage, "error-index", compiler.host, compiler.host); let _time = helpers::timeit(builder); builder - .run_tracked(BootstrapCommand::from(&mut tool).output_mode(OutputMode::PrintOnFailure)); + .run_tracked(BootstrapCommand::from(&mut tool).output_mode(OutputMode::OnlyOnFailure)); drop(guard); // The tests themselves need to link to std, so make sure it is // available. diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index c34fc9fa05462..9b414b24d2f3a 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -585,8 +585,8 @@ impl Build { BootstrapCommand::from(submodule_git().args(["diff-index", "--quiet", "HEAD"])) .allow_failure() .output_mode(match self.is_verbose() { - true => OutputMode::PrintAll, - false => OutputMode::PrintOutput, + true => OutputMode::All, + false => OutputMode::OnlyOutput, }), ); if has_local_modifications { @@ -967,15 +967,15 @@ impl Build { self.verbose(|| println!("running: {command:?}")); let output_mode = command.output_mode.unwrap_or_else(|| match self.is_verbose() { - true => OutputMode::PrintAll, - false => OutputMode::PrintOutput, + true => OutputMode::All, + false => OutputMode::OnlyOutput, }); let (output, print_error): (io::Result, bool) = match output_mode { - mode @ (OutputMode::PrintAll | OutputMode::PrintOutput) => ( + mode @ (OutputMode::All | OutputMode::OnlyOutput) => ( command.command.status().map(|status| status.into()), - matches!(mode, OutputMode::PrintAll), + matches!(mode, OutputMode::All), ), - OutputMode::PrintOnFailure => (command.command.output().map(|o| o.into()), true), + OutputMode::OnlyOnFailure => (command.command.output().map(|o| o.into()), true), }; let output = match output { @@ -1026,8 +1026,8 @@ impl Build { fn run(&self, cmd: &mut Command) { self.run_cmd(BootstrapCommand::from(cmd).fail_fast().output_mode( match self.is_verbose() { - true => OutputMode::PrintAll, - false => OutputMode::PrintOutput, + true => OutputMode::All, + false => OutputMode::OnlyOutput, }, )); } diff --git a/src/bootstrap/src/utils/exec.rs b/src/bootstrap/src/utils/exec.rs index 784d46a282f36..2ac8796191500 100644 --- a/src/bootstrap/src/utils/exec.rs +++ b/src/bootstrap/src/utils/exec.rs @@ -16,11 +16,11 @@ pub enum BehaviorOnFailure { pub enum OutputMode { /// Print both the output (by inheriting stdout/stderr) and also the command itself, if it /// fails. - PrintAll, + All, /// Print the output (by inheriting stdout/stderr). - PrintOutput, + OnlyOutput, /// Suppress the output if the command succeeds, otherwise print the output. - PrintOnFailure, + OnlyOnFailure, } /// Wrapper around `std::process::Command`. @@ -46,7 +46,7 @@ impl<'a> BootstrapCommand<'a> { /// Do not print the output of the command, unless it fails. pub fn quiet(self) -> Self { - self.output_mode(OutputMode::PrintOnFailure) + self.output_mode(OutputMode::OnlyOnFailure) } pub fn output_mode(self, output_mode: OutputMode) -> Self {