From 62cd81548946144885465af8890a79dca579c14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Sun, 7 Jul 2024 16:59:14 +0200 Subject: [PATCH] Disarm drop bombs for unexecuted test Cargo commands 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. --- src/bootstrap/src/utils/channel.rs | 2 +- src/bootstrap/src/utils/render_tests.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/src/utils/channel.rs b/src/bootstrap/src/utils/channel.rs index 8d5328c95eb2f..f8bcb584991a1 100644 --- a/src/bootstrap/src/utils/channel.rs +++ b/src/bootstrap/src/utils/channel.rs @@ -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") diff --git a/src/bootstrap/src/utils/render_tests.rs b/src/bootstrap/src/utils/render_tests.rs index 3a5776bdfe0dd..a3d0d36e7547d 100644 --- a/src/bootstrap/src/utils/render_tests.rs +++ b/src/bootstrap/src/utils/render_tests.rs @@ -33,6 +33,7 @@ pub(crate) fn try_run_tests( stream: bool, ) -> bool { if builder.config.dry_run() { + cmd.mark_as_executed(); return true; }