@@ -284,7 +284,9 @@ def main():
284284 stages .remove (JobStages .COLLECT_COVERAGE )
285285 else :
286286 stages .remove (JobStages .COLLECT_LOGS )
287- if is_coverage or info .is_local_run :
287+ if is_coverage or info .is_local_run or is_bugfix_validation :
288+ # For bugfix validation, we intentionally skip the check error stage (checks FATAL messages):
289+ # regular test failures are assumed to be sufficient to validate the test
288290 stages .remove (JobStages .CHECK_ERRORS )
289291 if info .is_local_run :
290292 if JobStages .COLLECT_LOGS in stages :
@@ -542,7 +544,11 @@ def start():
542544
543545 if JobStages .RETRIES in stages and test_result and test_result .is_failure ():
544546 # retry all failed tests and mark original failed either as success on retry or failed on retry
545- failed_tests = [t .name for t in test_result .results if t .is_failure ()]
547+ failed_tests = [
548+ t .name
549+ for t in test_result .results
550+ if t .is_failure () and t .name and t .name [0 ].isdigit ()
551+ ]
546552 if len (failed_tests ) > 10 :
547553 results .append (
548554 Result (
@@ -620,24 +626,28 @@ def start():
620626 test_result .extend_sub_results (results [- 1 ].results )
621627 results [- 1 ].results = []
622628
623- # invert result status for bugfix validation
624- if is_bugfix_validation :
625- has_failure = False
626- for r in results [- 1 ].results :
627- r .set_label ("xfail" )
628- if r .status == Result .StatusExtended .FAIL :
629- r .status = Result .StatusExtended .OK
630- has_failure = True
631- elif r .status == Result .StatusExtended .OK :
632- r .status = Result .StatusExtended .FAIL
633- if not has_failure :
634- print ("Failed to reproduce the bug" )
635- results [- 1 ].set_failed ().set_info ("Failed to reproduce the bug" )
636- else :
637- results [- 1 ].set_success ()
638-
639- if not results [- 1 ].is_ok ():
640- results [- 1 ].set_info ("Found errors added into Tests results" )
629+ # invert result status for bugfix validation
630+ if is_bugfix_validation and test_result :
631+ has_failure = False
632+ for r in test_result .results :
633+ r .set_label ("xfail" )
634+ if r .status == Result .StatusExtended .FAIL :
635+ r .status = Result .StatusExtended .OK
636+ has_failure = True
637+ elif r .status == Result .StatusExtended .OK :
638+ r .status = Result .StatusExtended .FAIL
639+ if not has_failure :
640+ print ("Failed to reproduce the bug" )
641+ test_result .set_failed ().set_info ("Failed to reproduce the bug" )
642+ else :
643+ # For bugfix validation, the expected behavior is:
644+ # - At least one test must fail (bug reproduced)
645+ # - The overall Tests result is treated as success in that case
646+ test_result .set_success ()
647+
648+ # For bugfix validation, "Check errors" (latest in the list) is only a helper step and
649+ # must not affect the overall job result.
650+ results [- 1 ].set_success ()
641651
642652 if JobStages .COLLECT_LOGS in stages :
643653 print ("Collect logs" )
0 commit comments