Skip to content

Added sidecar mechanism for hard-fault-/thread-kill-tolerant CI test logging#641

Open
Micky774 wants to merge 1 commit into
devfrom
zain/ci-log-partial
Open

Added sidecar mechanism for hard-fault-/thread-kill-tolerant CI test logging#641
Micky774 wants to merge 1 commit into
devfrom
zain/ci-log-partial

Conversation

@Micky774

Copy link
Copy Markdown
Contributor

Description

The CI test summary (junit_report.py) is a pure aggregator of JUnit XML files, but pytest writes its --junitxml only at session end so a --timeout-method=thread firing, segfault, or OOM-kill that os._exit()s the process produces no XML for that file, and the summary silently drops it and shows green even though the suite exit-code gate correctly fails.

This change closes that gap on two levels:

(1) a new te_ci_result_sink pytest plugin streams each test's progress to a <junitxml>.partial sidecar (flushed per line, deleted on clean exit), which junit_report.py reconstructs when a run hard-exits, preserving pre-crash passes and surfacing the in-flight test as a [timeout]

(2) as a floor, pytest_run now synthesizes a minimal error report when pytest exits non-zero without writing any XML at all (e.g. usage/conftest-import errors before the plugin loads), so the summary always stays consistent with the pass/fail gate. Verified end-to-end against real thread-method timeouts, conftest errors, normal failures, and clean passes.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Change A
  • Change B

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@Micky774 Micky774 requested a review from alextmagro June 19, 2026 19:48
@Micky774 Micky774 marked this pull request as ready for review June 19, 2026 19:48
@Micky774 Micky774 added the ci-level 1 CI test level 1 label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-level 1 CI test level 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant