Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit949e667

Browse files
committed
Removerun_quiet
1 parenta12f541 commit949e667

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

‎src/bootstrap/src/core/build_steps/test.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use crate::core::builder::{Builder, Compiler, Kind, RunConfig, ShouldRun, Step};
2626
usecrate::core::config::flags::get_completion;
2727
usecrate::core::config::flags::Subcommand;
2828
usecrate::core::config::TargetSelection;
29-
usecrate::utils::exec::BootstrapCommand;
29+
usecrate::utils::exec::{BootstrapCommand,OutputMode};
3030
usecrate::utils::helpers::{
3131
self, add_link_lib_path, add_rustdoc_cargo_linker_args, dylib_path, dylib_path_var,
3232
linker_args, linker_flags, output, t, target_supports_cranelift_backend, up_to_date,
@@ -2312,7 +2312,8 @@ impl Step for ErrorIndex {
23122312
let guard =
23132313
builder.msg(Kind::Test, compiler.stage,"error-index", compiler.host, compiler.host);
23142314
let _time = helpers::timeit(builder);
2315-
builder.run_quiet(&mut tool);
2315+
builder
2316+
.run_tracked(BootstrapCommand::from(&mut tool).output_mode(OutputMode::PrintOnFailure));
23162317
drop(guard);
23172318
// The tests themselves need to link to std, so make sure it is
23182319
// available.

‎src/bootstrap/src/lib.rs‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ impl Build {
958958
})
959959
}
960960

961-
fnrun_tracked(&self,command:BootstrapCommand) ->CommandOutput{
961+
fnrun_tracked(&self,command:BootstrapCommand<'_>) ->CommandOutput{
962962
ifself.config.dry_run(){
963963
returnCommandOutput::default();
964964
}
@@ -970,7 +970,7 @@ impl Build {
970970
command.command.status().map(|status| status.into()),
971971
matches!(mode,OutputMode::PrintAll),
972972
),
973-
OutputMode::SuppressOnSuccess =>(command.command.output().map(|o| o.into()),true),
973+
OutputMode::PrintOnFailure =>(command.command.output().map(|o| o.into()),true),
974974
};
975975

976976
let output =match output{
@@ -1037,19 +1037,12 @@ impl Build {
10371037
))
10381038
}
10391039

1040-
/// Runs a command, printing out nice contextual information if it fails.
1041-
fnrun_quiet(&self,cmd:&mutCommand){
1042-
self.run_cmd(
1043-
BootstrapCommand::from(cmd).fail_fast().output_mode(OutputMode::SuppressOnSuccess),
1044-
);
1045-
}
1046-
10471040
/// Runs a command, printing out nice contextual information if it fails.
10481041
/// Exits if the command failed to execute at all, otherwise returns its
10491042
/// `status.success()`.
10501043
fnrun_quiet_delaying_failure(&self,cmd:&mutCommand) ->bool{
10511044
self.run_cmd(
1052-
BootstrapCommand::from(cmd).delay_failure().output_mode(OutputMode::SuppressOnSuccess),
1045+
BootstrapCommand::from(cmd).delay_failure().output_mode(OutputMode::PrintOnFailure),
10531046
)
10541047
}
10551048

@@ -1071,7 +1064,7 @@ impl Build {
10711064
}),
10721065
matches!(mode,OutputMode::PrintAll),
10731066
),
1074-
OutputMode::SuppressOnSuccess =>(command.command.output(),true),
1067+
OutputMode::PrintOnFailure =>(command.command.output(),true),
10751068
};
10761069

10771070
let output =match output{

‎src/bootstrap/src/utils/exec.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub enum OutputMode {
2020
/// Print the output (by inheriting stdout/stderr).
2121
PrintOutput,
2222
/// Suppress the output if the command succeeds, otherwise print the output.
23-
SuppressOnSuccess,
23+
PrintOnFailure,
2424
}
2525

2626
/// Wrapper around `std::process::Command`.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp