about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock1
-rw-r--r--src/tools/compiletest/Cargo.toml17
-rw-r--r--src/tools/compiletest/src/runtest.rs11
3 files changed, 14 insertions, 15 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 818743b135b..2175f0871e0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -718,7 +718,6 @@ name = "compiletest"
 version = "0.0.0"
 dependencies = [
  "anstyle-svg",
- "anyhow",
  "build_helper",
  "colored",
  "diff",
diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml
index 4f8e475e762..06e618c2d25 100644
--- a/src/tools/compiletest/Cargo.toml
+++ b/src/tools/compiletest/Cargo.toml
@@ -7,25 +7,26 @@ edition = "2021"
 doctest = false
 
 [dependencies]
+# tidy-alphabetical-start
 anstyle-svg = "0.1.3"
+build_helper = { path = "../../build_helper" }
 colored = "2"
 diff = "0.1.10"
-unified-diff = "0.2.1"
 getopts = "0.2"
+glob = "0.3.0"
+home = "0.5.5"
 indexmap = "2.0.0"
 miropt-test-tools = { path = "../miropt-test-tools" }
-build_helper = { path = "../../build_helper" }
-tracing = "0.1"
-tracing-subscriber = { version = "0.3.3", default-features = false, features = ["ansi", "env-filter", "fmt", "parking_lot", "smallvec"] }
 regex = "1.0"
+rustfix = "0.8.1"
 semver = { version = "1.0.23", features = ["serde"] }
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
-rustfix = "0.8.1"
+tracing = "0.1"
+tracing-subscriber = { version = "0.3.3", default-features = false, features = ["ansi", "env-filter", "fmt", "parking_lot", "smallvec"] }
+unified-diff = "0.2.1"
 walkdir = "2"
-glob = "0.3.0"
-anyhow = "1"
-home = "0.5.5"
+# tidy-alphabetical-end
 
 [target.'cfg(unix)'.dependencies]
 libc = "0.2"
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index c8a60b68da8..6446f9b11ae 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -10,7 +10,6 @@ use std::process::{Child, Command, ExitStatus, Output, Stdio};
 use std::sync::Arc;
 use std::{env, iter, str};
 
-use anyhow::Context;
 use colored::Colorize;
 use regex::{Captures, Regex};
 use tracing::*;
@@ -143,11 +142,11 @@ pub fn run(config: Arc<Config>, testpaths: &TestPaths, revision: Option<&str>) {
     }
 
     let cx = TestCx { config: &config, props: &props, testpaths, revision };
-    create_dir_all(&cx.output_base_dir())
-        .with_context(|| {
-            format!("failed to create output base directory {}", cx.output_base_dir().display())
-        })
-        .unwrap();
+
+    if let Err(e) = create_dir_all(&cx.output_base_dir()) {
+        panic!("failed to create output base directory {}: {e}", cx.output_base_dir().display());
+    }
+
     if props.incremental {
         cx.init_incremental_test();
     }