Fix publishing of ILLink test results#131042
Conversation
illink tests build as Debug but the leg runs Release, so results were written to TestResults/Debug while publish searched TestResults/Release. Copy them across and set testResultsFormat: xunit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e35806bf-7fa8-4945-8da2-429438b5565b
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @akoeplinger, @matouskozak, @simonrozsival |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the runtime linker (ILLink) test pipeline to ensure test results are actually published to Azure DevOps by aligning the publish format and working around a configuration mismatch between where results are produced and where the publish step searches.
Changes:
- Configure test publishing format explicitly as xUnit for the ILLink test job.
- Copy ILLink xUnit result XMLs from
artifacts/TestResults/Debugintoartifacts/TestResults/$(_BuildConfig)so the shared publish step can find them.
|
Workflow state for the Holistic Review Orchestrator. {
"version": 5,
"last_dispatched_commit": "2680cb88055405afd4b7b99cbf6f491ecbc0ab58",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "3c0f3ccfbbe6fe37428ba2e164d606fb9a927895",
"last_reviewed_commit": "2680cb88055405afd4b7b99cbf6f491ecbc0ab58",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "3c0f3ccfbbe6fe37428ba2e164d606fb9a927895",
"last_recorded_worker_run_id": "29697811944",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "2680cb88055405afd4b7b99cbf6f491ecbc0ab58",
"review_id": 4731240515
}
]
} |
There was a problem hiding this comment.
Holistic Review
Motivation: The runtime-linker-tests pipeline runs its ILLink tests using ToolsConfiguration=Debug, so arcade writes the xUnit result XML to artifacts/TestResults/Debug. The Arcade publish step (eng/common/core-templates/job/job.yml) only searches artifacts/TestResults/$(_BuildConfig), which is Release for this leg. As a result ILLink test results were never published and failures did not surface in the Tests tab. Fixing this improves diagnosability of trimming-test failures.
Approach: Two changes to eng/pipelines/runtime-linker-tests.yml: (1) add testResultsFormat: 'xunit' to the ILLink_Tests job parameters, and (2) add a CopyFiles@2 post-build step that copies **/*.xml from artifacts/TestResults/Debug to artifacts/TestResults/$(_BuildConfig) with condition: succeededOrFailed() so results are published even when tests fail. Both changes are consistent with how the shared publish template consumes results.
Summary: The fix is correct and appropriately scoped. The copy source/target paths match the actual illink Debug output location and the Arcade publish searchFolder (artifacts/TestResults/$(_BuildConfig)). succeededOrFailed() correctly ensures failing runs still publish, complementing the publish task's own condition: always(). Setting testResultsFormat: 'xunit' narrows publishing to the xUnit branch of the template's conditional (line 171); note that with enablePublishTestResults: true and the prior empty format, both the xUnit and VSTest publish steps were technically enabled, so explicitly selecting xunit avoids the redundant VSTest (*.trx) search for a leg that only emits xUnit XML. CopyFiles@2 creates the target folder automatically, and the **/*.xml glob under the dedicated TestResults folder is safe. This is a low-risk, CI-only change with no product code impact. LGTM.
Note
This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.
Generated by Holistic Review · 69.4 AIC · ⌖ 16 AIC · ⊞ 10K
illink tests build as Debug but the leg runs Release, so results were written to TestResults/Debug while publish searched TestResults/Release. Copy them across and set testResultsFormat: xunit.