Skip to content

Preserve Android NativeAOT single-file test results - #130676

Merged
kotlarmilos merged 1 commit into
dotnet:mainfrom
kotlarmilos:pr/android-nativeaot-results
Jul 15, 2026
Merged

kotlarmilos merged 1 commit into
dotnet:mainfrom
kotlarmilos:pr/android-nativeaot-results

Conversation

@kotlarmilos

@kotlarmilos kotlarmilos commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Description

This makes SingleFileTestRunner write testResults.xml to TEST_RESULTS_DIR when no explicit -xml path is provided. The Android runner already sets this directory and reports that file to XHarness, but NativeAOT single-file tests previously emitted failures only to logcat. In https://dev.azure.com/dnceng-public/public/_build/results?buildId=1507526 the failing WebSockets test could not be identified because logcat evicted the failure and no structured result file was produced. An explicit -xml argument continues to override the environment-derived path.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: 2b951d28-c99d-4820-9a3d-dbd6fa51fc74
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SingleFileTestRunner used by single-file / NativeAOT library tests so it can produce a structured testResults.xml automatically when the test harness provides a results output directory via TEST_RESULTS_DIR.

Changes:

  • Default the XML results output path to Path.Combine(TEST_RESULTS_DIR, "testResults.xml") when TEST_RESULTS_DIR is set.
  • Preserve existing behavior where an explicit -xml <path> argument overrides the default.
Show a summary per file
File Description
src/libraries/Common/tests/SingleFileTestRunner/SingleFileTestRunner.cs Adds environment-derived default XML results path so Android NativeAOT single-file runs can preserve xUnit results as a file.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

@kotlarmilos
kotlarmilos marked this pull request as draft July 14, 2026 13:50
@kotlarmilos

Copy link
Copy Markdown
Member Author

/azp run runtime-android

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@matouskozak matouskozak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have an ongoing work to make both android and apple xharness native AOT compatible, I suppose when that's done, we might eb able to get rid of single file test runner completely.

@kotlarmilos
kotlarmilos merged commit e00eafc into dotnet:main Jul 15, 2026
107 of 113 checks passed
@dotnet-milestone-bot dotnet-milestone-bot Bot modified the milestones: 11.0.0, 11.0-preview7 Jul 16, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 16, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 9419ef40 Deployed Jul 15, 2026 by kotlarmilos via conclusion #5038
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants