From 234405c1f7d9f2ae723d5c5bb9783e6bde6e6204 Mon Sep 17 00:00:00 2001 From: rakita Date: Tue, 14 Jan 2025 13:38:33 +0100 Subject: [PATCH] fix(revme): Statetest stop exec when print output is true (#1995) * fix(revme): statetest remove redundant json output * fix(revme): Statetest stop exec when print output is true --- bins/revme/src/cmd/statetest/runner.rs | 6 +++--- bins/revme/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bins/revme/src/cmd/statetest/runner.rs b/bins/revme/src/cmd/statetest/runner.rs index 0b43cf22d5..9d5f01c4a9 100644 --- a/bins/revme/src/cmd/statetest/runner.rs +++ b/bins/revme/src/cmd/statetest/runner.rs @@ -482,10 +482,10 @@ pub fn execute_test_suite( (e, res) }; - // Print only once or - // if we are already in trace mode, just return error + // Print only once or if we are already in trace mode, just return error + // If trace is true that print_json_outcome will be also true. static FAILED: AtomicBool = AtomicBool::new(false); - if trace || FAILED.swap(true, Ordering::SeqCst) { + if print_json_outcome || FAILED.swap(true, Ordering::SeqCst) { return Err(TestError { name: name.clone(), path: path.clone(), diff --git a/bins/revme/src/main.rs b/bins/revme/src/main.rs index 992e9d248e..bb3aa98490 100644 --- a/bins/revme/src/main.rs +++ b/bins/revme/src/main.rs @@ -2,5 +2,5 @@ use clap::Parser; use revme::cmd::{Error, MainCmd}; fn main() -> Result<(), Error> { - MainCmd::parse().run().inspect_err(|e| eprintln!("{e:?}")) + MainCmd::parse().run().inspect_err(|e| println!("{e:?}")) }