From e7f651c9f16abd9d0e6944bf88771672207b8aff Mon Sep 17 00:00:00 2001 From: elfedy Date: Tue, 21 Jan 2025 18:23:38 -0300 Subject: [PATCH] try changing failure output' --- .github/workflows/nextest.yml | 2 +- crates/forge/src/runner.rs | 8 ++++---- crates/forge/tests/it/invariant.rs | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nextest.yml b/.github/workflows/nextest.yml index 83c294984..726786f88 100644 --- a/.github/workflows/nextest.yml +++ b/.github/workflows/nextest.yml @@ -95,4 +95,4 @@ jobs: SVM_TARGET_PLATFORM: linux-amd64 HTTP_ARCHIVE_URLS: ${{ secrets.HTTP_ARCHIVE_URLS }} WS_ARCHIVE_URLS: ${{ secrets.WS_ARCHIVE_URLS }} - run: cargo nextest run -E 'kind(test) & !test(/issue|forge_std|ext_integration|zk|test_zk_aave_di/)' --partition count:3/3 --no-capture + run: cargo nextest run -E 'kind(test) & !test(/issue|forge_std|ext_integration|zk|test_zk_aave_di/)' --partition count:3/3 --no-capture --failure-output immediate-final diff --git a/crates/forge/src/runner.rs b/crates/forge/src/runner.rs index 14db62c27..47caaf037 100644 --- a/crates/forge/src/runner.rs +++ b/crates/forge/src/runner.rs @@ -669,8 +669,8 @@ impl<'a> FunctionRunner<'a> { match invariant_result.error { // If invariants were broken, replay the error to collect logs and traces Some(error) => match error { - InvariantFuzzError::BrokenInvariant(case_data) - | InvariantFuzzError::Revert(case_data) => { + InvariantFuzzError::BrokenInvariant(case_data) | + InvariantFuzzError::Revert(case_data) => { // Replay error to create counterexample and to collect logs, traces and // coverage. match replay_error( @@ -788,8 +788,8 @@ impl<'a> FunctionRunner<'a> { let address = self.setup.address; // Apply before test configured functions (if any). - if self.cr.contract.abi.functions().filter(|func| func.name.is_before_test_setup()).count() - == 1 + if self.cr.contract.abi.functions().filter(|func| func.name.is_before_test_setup()).count() == + 1 { for calldata in self .executor diff --git a/crates/forge/tests/it/invariant.rs b/crates/forge/tests/it/invariant.rs index bb12aeef0..797ae0a0c 100644 --- a/crates/forge/tests/it/invariant.rs +++ b/crates/forge/tests/it/invariant.rs @@ -617,6 +617,8 @@ async fn test_invariant_roll_fork_handler() { }); let results = runner.test_collect(&filter); error!("AAAAAAAAAAAAAH"); + eprintln!("In Stderrr"); + println!("In Stdout"); assert_multiple( &results, BTreeMap::from([