Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion tests/dotnet/UnitTests/AppSizeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ public void NativeAOT (ApplePlatform platform, string runtimeIdentifiers)
Run (platform, runtimeIdentifiers, "Release", $"{platform}-NativeAOT", false, new Dictionary<string, string> () { { "PublishAot", "true" }, { "_IsPublishing", "true" } });
}

[TestCase (ApplePlatform.iOS, "ios-arm64")]
public void CoreCLR_Interpreter (ApplePlatform platform, string runtimeIdentifiers)
{
Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-Interpreter", true, new Dictionary<string, string> () { { "UseMonoRuntime", "false" }, { "PublishReadyToRun", "false" } });
}

[TestCase (ApplePlatform.iOS, "ios-arm64")]
[Ignore ("R2R is not implemented yet")]
public void CoreCLR_R2R (ApplePlatform platform, string runtimeIdentifiers)
{
Run (platform, runtimeIdentifiers, "Release", $"{platform}-CoreCLR-R2R", true, new Dictionary<string, string> () { { "UseMonoRuntime", "false" }, { "PublishReadyToRun", "true" } });
}

// This test will build the SizeTestApp, and capture the resulting app size.
// The app size is stored in a file on disk, so we can make sure app size doesn't change (or at least we notice it and we can update the known state).
// There's a tolerance in the test for minor app size variances, so if this test fails, the current change might not mean there's a big change,
Expand Down Expand Up @@ -153,7 +166,7 @@ void AssertAssemblyReport (ApplePlatform platform, string name, string appPath,
}
preservedAPIs.Sort ();
var expectedFile = Path.Combine (expectedDirectory, $"{name}-preservedapis.txt");
var expectedAPIs = File.ReadAllLines (expectedFile);
var expectedAPIs = File.Exists (expectedFile) ? File.ReadAllLines (expectedFile) : [];
var addedAPIs = preservedAPIs.Except (expectedAPIs).ToList ();
var removedAPIs = expectedAPIs.Except (preservedAPIs).ToList ();

Expand Down
Loading
Loading