tmt icon indicating copy to clipboard operation
tmt copied to clipboard

exit-first does not apply across discover phase boundaries

Open happz opened this issue 1 year ago • 0 comments

With multiple discover phases, each gets its own clone of the execute plugin. All copies do have an exit-first flag set, but if a test fails in one discover phase, follow-up discover phases remain oblivious and continue. The only check in execute/tmt happens after a test is run:

if (abort or self.data.exit_first and result.result not in (ResultOutcome.PASS, ResultOutcome.INFO))

This obviously does not include checking whether a previous plugin invocation, to run tests from the earlier discover phase, finished successfully. That could be a fix: before running any test, with the exit-first flag set, execute/tmt would check all results collected so far and skip running any tests if the check above would trigger.

happz avatar Jul 29 '24 08:07 happz