Skip to content

Commit

Permalink
Disarm drop bombs for unexecuted test Cargo commands
Browse files Browse the repository at this point in the history
The code for running tests uses a custom command machinery because it streams the output of the command. We thus need to mark the command as executed in a dry run, to avoid a drop bomb panic.
  • Loading branch information
Kobzol committed Jul 7, 2024
1 parent d6c149d commit 62cd815
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/bootstrap/src/utils/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ impl GitInfo {

// Ok, let's scrape some info
let ver_date = output(
&mut helpers::git(Some(dir))
helpers::git(Some(dir))
.arg("log")
.arg("-1")
.arg("--date=short")
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/src/utils/render_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub(crate) fn try_run_tests(
stream: bool,
) -> bool {
if builder.config.dry_run() {
cmd.mark_as_executed();
return true;
}

Expand Down

0 comments on commit 62cd815

Please sign in to comment.