Skip to content

Skip incremental build timing assertions for NativeAOT#10937

Merged
jonathanpeppers merged 3 commits intomainfrom
copilot/repetitive-build-update-test
Mar 13, 2026
Merged

Skip incremental build timing assertions for NativeAOT#10937
jonathanpeppers merged 3 commits intomainfrom
copilot/repetitive-build-update-test

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

Summary

The RepetiviteBuildUpdateSingleResource(NativeAOT) test was failing because NativeAOT incremental builds aren't necessarily faster than clean builds. Incremental build timing is not a feature we care about for NativeAOT.

Changes

Guarded only the timing comparison assertions with if (runtime != AndroidRuntime.NativeAOT) in three tests, so the tests continue to run for NativeAOT and still validate incremental target-skipping behavior:

  • RepetiviteBuildUpdateSingleResource (AndroidUpdateResourcesTest.cs) — the reported failing test; guarded the 1st-vs-2nd build time assertion
  • BasicApplicationRepetitiveBuild (IncrementalBuildTest.cs) — guarded the 1st-vs-2nd build time assertion
  • AppProjectTargetsDoNotBreak (IncrementalBuildTest.cs) — guarded the 3rd-vs-1st and 3rd-vs-2nd build time assertions

BasicApplicationRepetitiveReleaseBuild already skips non-MonoVM runtimes, so no change was needed there.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI and others added 2 commits March 13, 2026 16:53
Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

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 Xamarin.Android build/test coverage to stop asserting incremental-build timing improvements for the NativeAOT runtime, since NativeAOT incremental builds aren’t guaranteed to be faster than clean builds.

Changes:

  • Skip BasicApplicationRepetitiveBuild for AndroidRuntime.NativeAOT via Assert.Ignore.
  • Skip AppProjectTargetsDoNotBreak for AndroidRuntime.NativeAOT via Assert.Ignore.
  • Skip RepetiviteBuildUpdateSingleResource for AndroidRuntime.NativeAOT via Assert.Ignore.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/IncrementalBuildTest.cs Adds NativeAOT Assert.Ignore to two timing-sensitive incremental build tests.
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/AndroidUpdateResourcesTest.cs Adds NativeAOT Assert.Ignore to an incremental resource update test with a timing assertion.

@jonathanpeppers
Copy link
Member

@copilot can you address the review comments: #10937 (review)

… tests

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 13, 2026

@copilot can you address the review comments: #10937 (review)

Addressed in c30674b. Instead of skipping entire tests with Assert.Ignore, I now guard only the timing assertions with if (runtime != AndroidRuntime.NativeAOT) so all incremental target-skipping behavior is still validated for NativeAOT.

Copilot AI changed the title Skip incremental build timing tests for NativeAOT Skip incremental build timing assertions for NativeAOT Mar 13, 2026
@jonathanpeppers jonathanpeppers merged commit 61bc9a4 into main Mar 13, 2026
5 of 6 checks passed
@jonathanpeppers jonathanpeppers deleted the copilot/repetitive-build-update-test branch March 13, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants