[TrimmableTypeMap] Integration parity tests#10827
Open
simonrozsival wants to merge 7 commits intodotnet:mainfrom
Open
[TrimmableTypeMap] Integration parity tests#10827simonrozsival wants to merge 7 commits intodotnet:mainfrom
simonrozsival wants to merge 7 commits intodotnet:mainfrom
Conversation
7dafb1e to
810c7e5
Compare
There was a problem hiding this comment.
Pull request overview
Adds an integration test slice for TrimmableTypeMap scanner parity by building a real-user-types fixture assembly and running side-by-side comparisons against the legacy Cecil-based scanner, then wires these integration tests into the solution and Windows CI.
Changes:
- Add
Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTestsproject with scanner parity/comparison tests (Mono.Android + user fixture). - Add
UserTypesFixtureproject to produce a “real user types” assembly referencing Mono.Android/Java.Interop. - Wire the integration tests into
Xamarin.Android.sln, addInternalsVisibleTo, and run/publish results in the Windows CI steps.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/UserTypesFixture/UserTypesFixture.csproj | New fixture project that compiles user-type edge cases and outputs DLL next to integration tests. |
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/UserTypesFixture/UserTypes.cs | User-type fixture source covering component attributes, nested types, [Export], etc. |
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/ScannerComparisonTests.cs | New parity tests comparing legacy scanner output vs new SRM-based scanner across multiple dimensions. |
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/MockBuildEngine.cs | Minimal IBuildEngine stub for TaskLoggingHelper usage in scanner tests. |
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests.csproj | New xUnit integration test project referencing TrimmableTypeMap + Build.Tasks + fixture build output. |
| src/Xamarin.Android.Build.Tasks/Properties/AssemblyInfo.cs | Adds InternalsVisibleTo for the new integration test assembly. |
| build-tools/automation/yaml-templates/build-windows-steps.yaml | Runs/publishes TrimmableTypeMap integration tests in Windows CI. |
| Xamarin.Android.sln | Adds the new integration test and fixture projects to the solution. |
tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/ScannerComparisonTests.cs
Outdated
Show resolved
Hide resolved
tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/ScannerComparisonTests.cs
Outdated
Show resolved
Hide resolved
tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/ScannerComparisonTests.cs
Outdated
Show resolved
Hide resolved
...osoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/UserTypesFixture/UserTypesFixture.csproj
Show resolved
Hide resolved
tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/ScannerComparisonTests.cs
Outdated
Show resolved
Hide resolved
810c7e5 to
d1debed
Compare
Member
Author
|
/azp run Xamarin.Android-PR |
|
No pipelines are associated with this pull request. |
Member
Author
|
/azp run Xamarin.Android-PR |
|
No pipelines are associated with this pull request. |
Add IntegrationTests and UserTypesFixture projects to Xamarin.Android.sln. Add CI step to run integration tests and publish results. Add InternalsVisibleTo for the integration test assembly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
942b250 to
42d36ad
Compare
Remove test logging/noise, extract reusable helpers, and split long comparison flows into focused helper methods. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract list-diff logic from [Fact] methods into ComparisonDiffHelper and remove section-divider comments from UserTypes fixture. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- ScannerRunner.cs: TypeMapEntry/MethodEntry/TypeMethodGroup records + scanner logic - TypeDataBuilder.cs: TypeComparisonData record + Cecil/peer type data builders - MarshalMethodDiffHelper.cs: marshal method comparison logic - ComparisonDiffHelper.cs: per-field type comparison helpers - ScannerComparisonTests.Helpers.cs: partial class with assertion helpers + assembly path properties - ScannerComparisonTests.cs: now contains only [Fact] methods Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
This one fails to build with: |
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.
Stacked on #10823.
Part of #10798
Scope
Review guide
Two commits — review in order: