@@ -865,14 +865,15 @@ def _para_test_step(self, parallel=1):
865865 setvar ('CXXFLAGS' , old_cxxflags )
866866
867867 ignore_patterns = self .cfg ['test_suite_ignore_patterns' ] or []
868- ignored_pattern = 0
869- failed_pattern = 0
870- for line in out .splitlines ():
871- if any (line .startswith (f'{ x } : ' ) for x in OUTCOMES_LOG ):
872- if any (patt in line for patt in ignore_patterns ):
873- self .log .info ("Ignoring test failure: %s" , line )
874- ignored_pattern += 1
875- failed_pattern += 1
868+ ignored_pattern_matches = 0
869+ failed_pattern_matches = 0
870+ if ignore_patterns :
871+ for line in out .splitlines ():
872+ if any (line .startswith (f'{ x } : ' ) for x in OUTCOMES_LOG ):
873+ if any (patt in line for patt in ignore_patterns ):
874+ self .log .info ("Ignoring test failure: %s" , line )
875+ ignored_pattern_matches += 1
876+ failed_pattern_matches += 1
876877
877878 rgx_failed = re .compile (r'^ +Failed +: +([0-9]+)' , flags = re .MULTILINE )
878879 mch = rgx_failed .search (out )
@@ -896,14 +897,14 @@ def _para_test_step(self, parallel=1):
896897 self .log .info ("Tests timed out: %s" , num_timed_out )
897898 num_failed += num_timed_out
898899
899- if num_failed != failed_pattern :
900- msg = f"Number of failed tests { num_failed } does not match "
901- msg += f"number identified from line by line patterns { failed_pattern } "
900+ if num_failed != failed_pattern_matches :
901+ msg = f"Number of failed tests ( { num_failed } ) does not match "
902+ msg += f"number identified va line-by- line pattern matching: { failed_pattern_matches } "
902903 self .log .warning (msg )
903904
904- if ignored_pattern :
905- self .log .info ("Ignored %s failed tests due to ignore patterns" , ignored_pattern )
906- num_failed -= ignored_pattern
905+ if ignored_pattern_matches :
906+ self .log .info ("Ignored %s failed tests due to ignore patterns" , ignored_pattern_matches )
907+ num_failed -= ignored_pattern_matches
907908
908909 return num_failed
909910
0 commit comments