about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Beránek <jakub.beranek@vsb.cz>2024-07-07 16:59:14 +0200
committerJakub Beránek <berykubik@gmail.com>2024-07-12 20:15:19 +0200
commit0cab9626f416f0f6bcf65221a3ed8ee38e69e97c (patch)
tree2af93c22154a6a1a06321f2ec4e0773abcbc576a
parentebb30890388d3a569de823d1278a0aa467847d32 (diff)
downloadrust-0cab9626f416f0f6bcf65221a3ed8ee38e69e97c.tar.gz
rust-0cab9626f416f0f6bcf65221a3ed8ee38e69e97c.zip
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.
-rw-r--r--src/bootstrap/src/utils/channel.rs2
-rw-r--r--src/bootstrap/src/utils/render_tests.rs1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/src/utils/channel.rs b/src/bootstrap/src/utils/channel.rs
index 8d5328c95eb..f8bcb584991 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 3a5776bdfe0..a3d0d36e754 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;
     }