Skip to content

Switch to one line pytest coverage call

What does this MR do?

In the previous example, if the second line failed and returned a nonzero exit code, it would exit the job before executing the fourth line that generates the coverage.xml required for test coverage visualization. This is painful, given that users probably want to visualize line-by-line coverage when the tests fail even more than when it passes.

Switch to a one-line call that runs the tests and produces a coverage report. This enables test coverage visualization regardless of if the job passes or fails, even if other future jobs are skipped by this job's failure.

Codym48/cmake_saver!7 proves that a failing pipeline still produces the desired visualization:

image

Related issues

Grew out of this comment thread: #236248 (comment 1332138800)

Edited by Cody Martin

Merge request reports