Skip to content

test(testkit): keep the JUnit report current during a run - #5458

Open
elezar wants to merge 1 commit into
test/5333-surface-test-stalls/elezarfrom
test/5416-incremental-junit/elezar
Open

elezar wants to merge 1 commit into
test/5333-surface-test-stalls/elezarfrom
test/5416-incremental-junit/elezar

Conversation

@elezar

@elezar elezar commented Nov 10, 2026

Copy link
Copy Markdown
Member

Stacked on #5455, which is stacked on #5450. This diff is against #5455's branch.

Summary

The testkit program wrote junit.xml only after its last test, so a run-level timeout (45 minutes) lost the report and only the log survived.

  • Rewrite the report after each test, so a run that is stopped from outside still leaves the results so far. A write error during the run is logged; the final write still decides the exit status.
  • Write to <path>.partial and rename, so a kill during a write leaves the previous report, not a truncated one.

The test that is running when the run is stopped is not in the report, since it has no result yet.

Related Issue

Part of #5416 (this item came from the review of #5332; the issue stays open). Also resolves the junit.xml note on #5333.

Testing

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test pass for tests/testkit.
  • A new unit test checks that writing replaces the report and leaves no partial file.
  • No e2e lane was run.

The program wrote junit.xml only after its last test, so a run-level timeout lost the report. Rewrite it after each test, replacing the file in one step so a kill mid-write leaves the previous report.

Part of #5416.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
@elezar elezar added area:build Related to CI/CD and builds topic:testing labels Nov 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:build Related to CI/CD and builds topic:testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant