Repository navigation
Run dn integration tests in the Native AOT test runner - #55854
Merged
JeremyKuhne merged 4 commits intoAug 19, 2026
Merged
Conversation
The native runner published only dotnet-aot.Tests, so end-to-end tests treated the missing dn host as inconclusive. Publish dn and dotnet-aot for the host RID, load the test-built library separately from a complete SDK layout, and require the integration tests to execute.
JeremyKuhne
requested review from
a team,
lbussell and
mthalman
as code owners
August 19, 2026 00:02
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Native AOT CLI test runner so CI executes the dn end-to-end integration tests against a complete SDK layout, while loading the freshly published dotnet-aot native library from a separate directory. This closes a gap where CI could pass without validating the real native host/library boundary and managed fallback behavior.
Changes:
- Publish additional Native AOT artifacts for the test run (
dotnet-aotnative library anddnhost) and fail preflight if they’re missing. - Pass explicit SDK/host/library/dn paths into the Native AOT test binary via environment variables to enable reliable integration/E2E coverage.
- Update integration fixtures and workflow guidance to support separated-layout and “no-build fallback” validation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/dotnet-aot.Tests/run-aot-tests.sh | Publishes dotnet-aot.Tests, dotnet-aot library, and dn, then runs tests with required env vars and preflight checks. |
| test/dotnet-aot.Tests/run-aot-tests.ps1 | Same as the bash runner; additionally normalizes dotnet(.exe) and scopes env var setup/restore around execution. |
| test/dotnet-aot.Tests/AotIntegrationTests.cs | Allows sourcing the dotnet-aot library from DOTNET_AOT_LIBRARY_DIR and tightens the synthetic cache fallback setup. |
| src/Cli/dn/run-dn.ps1 | Ensures DOTNET_AOT_LIBRARY_DIR is included in the env var hygiene for local dn runs. |
| src/Cli/dn/Program.cs | Adds DOTNET_AOT_LIBRARY_DIR support so dn can load the native library separately from the SDK directory used for SDK-relative assets. |
| .github/skills/add-dotnet-aot-command/SKILL.md | Updates workflow guidance to reflect the runner’s expanded publish+run contract and integration-test expectations. |
JeremyKuhne
enabled auto-merge (squash)
August 19, 2026 20:08
joeloff
approved these changes
Aug 19, 2026
JeremyKuhne
had a problem deploying
to
copilot-pat-pool
August 19, 2026 20:10 — with
GitHub Actions
Failure
This branch had an error being deployed
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
The Native AOT CLI test runner currently publishes only the
dotnet-aot.Testsexecutable.AotIntegrationTestslaunches the separatednhost, so those tests report inconclusive when the host is absent and CI can pass without exercising the real native host/library boundary.This change makes the runner:
dotnet-aot.Tests, the productdotnet-aotnative library, anddnfor the host RIDdnagainst a complete installed SDK while loading the freshly published native library from a separate directoryHistory
#54297 introduced the Native AOT test project and the
dnintegration tests. Its validation explicitly reported38 passed, 6 skipped; the integration tests were designed to skip whendnhad not been built.#54719 added the native test runner to Windows, Linux, and macOS CI. Its validation reported
0 failed, 52 passed, 9 skipped, including the sixdnintegration tests. The CI runner still published only the test executable, so this was a deliberate incremental scope boundary rather than a platform restriction.As a result, CI proved that the test closure could compile and execute under Native AOT, but it did not prove that the separately published
dnhost could load the product library, use a complete SDK layout, or transition to managed fallback.Implementation notes
DOTNET_AOT_SDK_DIRcontinues to identify the complete versioned SDK directory passed todotnet_execute. A separateDOTNET_AOT_LIBRARY_DIRtest hook identifies the directory containing the freshly published product library. Keeping these paths separate avoids modifying the bootstrap SDK while preserving realistic SDK-relative lookup forRoslyn,Sdks,Current, and install-rootpacks.The no-build fallback integration fixture also now creates a cache shape that the native path intentionally rejects. A source timestamp change alone is valid with managed
--no-buildsemantics and therefore could not reach the asserted fallback branch.Validation
Windows
win-x64, Release Native AOT run:Result:
159discovered,159executed,159passed,0failed,0skipped.The assembled artifacts were rerun with
-NoBuildwith the same result.bash -n test/dotnet-aot.Tests/run-aot-tests.sh, diagnostics, andgit diff --checkalso pass. Linux and macOS native execution are left to the existing CI matrix.