ci(qdc): reconstruct pytest summary from --report-log on abort - #1291
Merged
Conversation
pytest's --junitxml flushes only at session end, so any mid-run process abort (Fatal Python error, Windows fatal exception) leaves the XML empty and the Actions Summary page falls back to a bare 'No JUnit XML recovered' line. Add --report-log alongside --junitxml — it emits one NDJSON record per test as each finishes and flushes after every write, so the ledger survives the abort. run_qdc_pytest prefers the JUnit XML when it's complete and reconstructs the same markdown from the NDJSON otherwise, tagging tests that started but never produced a call-phase report so the aborting cell is visible on the summary. Signed-off-by: Mengsheng Wu <mengshengwu@outlook.com>
Mengsheng Wu (mengshengwu)
requested review from
David Qian (Davidqian123),
Paul Zhu (vinovo) and
Perry Cheng (zhycheng614)
as code owners
August 5, 2026 07:47
Mengsheng Wu (mengshengwu)
requested review from
RemiliaForever (RemiliaForever),
AlexCHEN (alexchen4ai) and
Zack Li (zhiyuan8)
as code owners
August 5, 2026 07:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test-sdk-qdcshows a bare No JUnit XML recovered line whenever the on-device pytest process aborts mid-run (Fatal Python error,Windows fatal exception).--junitxmlonly flushes at session end, so a native crash truncates the file to nothing and there is no cell-level record for the run.--report-logalongside--junitxmlon the QDC pytest command. pytest-reportlog writes one NDJSON record per test as it completes and flushes after every write, so the ledger survives an abort.run_qdc_pytest.pystill prefers the JUnit XML when it is complete; when it is empty or absent it reconstructs the same markdown from the NDJSON. Nodeids that started but never produced acall-phase report are surfaced asprocess aborted before test completedso the crashing cell is visible on the summary page.Test plan
process aborted before test completed.No JUnit XML recovered). Pending CI on this PR.