From cb20d9583ac5a69b4bf0d048cf047b93a5433c6d Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Sat, 10 Aug 2024 09:57:25 -0700 Subject: [PATCH] Skipping --nocapture in harnesses --- tests/harness.rs | 5 ++++- tests/hosted.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/harness.rs b/tests/harness.rs index 75cb259..271bdf3 100644 --- a/tests/harness.rs +++ b/tests/harness.rs @@ -23,7 +23,10 @@ fn main() { let _ = tracing_subscriber::fmt() .with_max_level(tracing_subscriber::filter::LevelFilter::TRACE) .try_init(); - let filter = std::env::args().nth(1).unwrap_or_default(); + let filter = std::env::args() + .filter(|arg| !arg.starts_with('-')) + .nth(1) + .unwrap_or_default(); // let filter = String::from("mod_multi"); for entry in std::fs::read_dir("tests/cases").unwrap() { let entry = entry.unwrap().path(); diff --git a/tests/hosted.rs b/tests/hosted.rs index 64529fe..bacb7f2 100644 --- a/tests/hosted.rs +++ b/tests/hosted.rs @@ -18,7 +18,10 @@ fn main() { let _ = tracing_subscriber::fmt() .with_max_level(tracing_subscriber::filter::LevelFilter::TRACE) .try_init(); - let filter = std::env::args().nth(1).unwrap_or_default(); + let filter = std::env::args() + .filter(|arg| !arg.starts_with('-')) + .nth(1) + .unwrap_or_default(); // let filter = String::from("basic_struct"); for entry in std::fs::read_dir("tests/cases").unwrap() { let entry = entry.unwrap().path();