@@ -537,31 +537,25 @@ impl<'a> ContractRunner<'a> {
537537 ) -> TestResult {
538538 let TestSetup { address, mut logs, mut traces, mut labeled_addresses, .. } = setup;
539539
540- let skip_fuzz_config = FuzzConfig { runs : 1 , ..Default :: default ( ) } ;
541-
542- // Fuzz the test with only 1 run to check if it needs to be skipped.
543- let result =
544- FuzzedExecutor :: new ( & self . executor , runner. clone ( ) , self . sender , skip_fuzz_config)
545- . fuzz ( func, address, should_fail, self . errors ) ;
546- if let Some ( reason) = result. reason {
547- if matches ! ( reason. as_str( ) , "SKIPPED" ) {
548- return TestResult {
549- status : TestStatus :: Skipped ,
550- reason : None ,
551- decoded_logs : decode_console_logs ( & logs) ,
552- traces,
553- labeled_addresses,
554- kind : TestKind :: Standard ( 0 ) ,
555- ..Default :: default ( )
556- }
557- }
558- }
559-
560540 // Run fuzz test
561541 let start = Instant :: now ( ) ;
562542 let mut result = FuzzedExecutor :: new ( & self . executor , runner, self . sender , fuzz_config)
563543 . fuzz ( func, address, should_fail, self . errors ) ;
564544
545+ // Check the last test result and skip the test
546+ // if it's marked as so.
547+ if let Some ( "SKIPPED" ) = result. reason . as_deref ( ) {
548+ return TestResult {
549+ status : TestStatus :: Skipped ,
550+ reason : None ,
551+ decoded_logs : decode_console_logs ( & logs) ,
552+ traces,
553+ labeled_addresses,
554+ kind : TestKind :: Standard ( 0 ) ,
555+ ..Default :: default ( )
556+ }
557+ }
558+
565559 let kind = TestKind :: Fuzz {
566560 median_gas : result. median_gas ( false ) ,
567561 mean_gas : result. mean_gas ( false ) ,
0 commit comments