ci: fail topotest step when parallel run lacks JUnit failures - #22011
Conversation
When the parallel pytest run exits non-zero but analyze.py finds no failures in topotests.xml, fail the step instead of treating it as a pass. Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Greptile SummaryThis PR fixes a CI false-positive where a non-zero exit from the parallel
Confidence Score: 5/5Safe to merge β the change is a minimal, targeted two-line fix with no logic regressions. The change closes a clear gap in the failure-detection path: the parallel run had already exited non-zero, yet the step could report success when topotests.xml contained no recorded failures. The fix is well-scoped, all downstream always()-gated steps (artifact upload, cleanup) continue to run as before, and there are no new code paths introduced. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[docker run parallel pytest] -->|exit 0| B[All tests passed β exit 0]
A -->|exit non-zero| C[analyze.py -Ar: grab results from container]
C -->|no results dir| D[ERROR: no test results β exit 1]
C -->|no topotests.xml| E[ERROR: no XML, docker aborted β exit 1]
C -->|results grabbed| F[analyze.py -r: extract failed test names]
F -->|rerun_tests is empty| G_new["(NEW) ERROR: no failures in XML β exit 1 β
"]
F -->|rerun_tests non-empty| H[Re-run failed tests serially]
H -->|exit 0| I[All rerun tests passed β exit 0]
H -->|exit non-zero| J[Some rerun tests still failed β exit 1]
Reviews (1): Last reviewed commit: "ci: fail topotest step when parallel run..." | Re-trigger Greptile |
When the parallel pytest run exits non-zero but analyze.py finds no failures in topotests.xml, fail the step instead of treating it as a pass.