From b1981debc94b1dbe9378a53dae805206af9486da Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 14 Aug 2023 19:28:59 -0400 Subject: [PATCH] tests: Include test name in error context --- tests/tests/regression_tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/tests/regression_tests.rs b/tests/tests/regression_tests.rs index 5b97d47b716a..f71e14869a93 100644 --- a/tests/tests/regression_tests.rs +++ b/tests/tests/regression_tests.rs @@ -68,8 +68,8 @@ fn main() { .to_string_lossy() .replace('\\', "/"); if is_candidate(&args, &name) { - let test = Test::from_options_file(file.path(), name) - .context("Couldn't create test") + let test = Test::from_options_file(file.path(), name.clone()) + .with_context(|| format!("Couldn't create test {name}")) .unwrap(); let ignore = !test.should_run(!args.list); let mut trial = Trial::test(test.name.to_string(), move || {