Skip to content

Commit

Permalink
fix(revme): Statetest stop exec when print output is true (#1995)
Browse files Browse the repository at this point in the history
* fix(revme): statetest remove redundant json output

* fix(revme): Statetest stop exec when print output is true
  • Loading branch information
rakita authored Jan 14, 2025
1 parent 88c5a94 commit 234405c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bins/revme/src/cmd/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion bins/revme/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:?}"))
}

0 comments on commit 234405c

Please sign in to comment.