Open
Conversation
Unity's test framework needs to override this
Contributor
Author
|
@sbomer please take a look |
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/illink |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores overridability of the trimming customization hook used by the ILLink trimming test runners, enabling Unity’s test framework to override CustomizeTrimming as it could in .NET 8.
Changes:
- Mark
CustomizeTrimming(TrimmingDriver, TestCaseMetadataProvider)asvirtualin the sharedTestRunnerdeclaration. - Update the corresponding partial implementations in the Mono.Linker and NativeAOT trimming test runners to match the new
virtualmodifier.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/tools/illink/test/Trimming.Tests.Shared/TestRunner.cs | Makes the shared partial CustomizeTrimming declaration virtual so derived runners can override it. |
| src/tools/illink/test/Mono.Linker.Tests/TestCasesRunner/TestRunner.cs | Updates the partial implementation to include virtual, matching the shared declaration. |
| src/coreclr/tools/aot/ILCompiler.Trimming.Tests/TestCasesRunner/TestRunner.cs | Updates the partial implementation to include virtual, matching the shared declaration. |
sbomer
approved these changes
Feb 27, 2026
This was referenced Feb 27, 2026
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.
Unity's test framework needs to override this. At some point between net8 and now this was refactored and the
virtualwas dropped.