Skip to content

Commit d0c42fd

Browse files
Improve R2R incremental build test to verify target execution
Co-authored-by: simonrozsival <374616+simonrozsival@users.noreply.github.com>
1 parent f325441 commit d0c42fd

File tree

1 file changed

+5
-2
lines changed
  • src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests

1 file changed

+5
-2
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ public void DebugBuildR2RIncrementalBuild ([Values ("android-x64", "android-arm6
209209
Assert.IsTrue (b.Build (proj), "First build should have succeeded.");
210210
var firstBuildTime = b.LastBuildTime;
211211

212+
// Verify R2R compilation DID run in first build
213+
b.Output.AssertTargetIsNotSkipped ("CreateReadyToRunImages");
214+
212215
// Second build - R2R compilation should be SKIPPED (incremental build)
213216
Assert.IsTrue (b.Build (proj), "Second build should have succeeded.");
214217
var secondBuildTime = b.LastBuildTime;
@@ -217,8 +220,8 @@ public void DebugBuildR2RIncrementalBuild ([Values ("android-x64", "android-arm6
217220
Assert.IsTrue (secondBuildTime < firstBuildTime,
218221
$"Second build ({secondBuildTime}) should have been faster than first build ({firstBuildTime})");
219222

220-
// Verify CreateReadyToRunImages target is skipped on second build
221-
// This confirms R2R images are NOT being rebuilt
223+
// Verify R2R compilation DID NOT run in second build
224+
// This confirms R2R images are cached and NOT being rebuilt
222225
b.Output.AssertTargetIsSkipped ("CreateReadyToRunImages");
223226
}
224227

0 commit comments

Comments
 (0)