Skip to content

Commit

Permalink
[tests] Add a NativeAOT variation of monotouch-test.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Apr 28, 2023
1 parent 8bdbd06 commit 168ff42
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/monotouch-test/dotnet/iOS/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ norm:

run-norm:
$(Q) $(MAKE) build BUILD_ARGUMENTS="/p:RuntimeIdentifier=ios-arm64 /p:MtouchLink=SdkOnly /p:Configuration=Release-norm /bl:$@.binlog /t:Run"

nativeaot:
$(Q) $(MAKE) build BUILD_ARGUMENTS="/p:RuntimeIdentifier=ios-arm64 /p:PublishAot=true /p:MtouchLink=SdkOnly /p:Configuration=Release /bl:$@.binlog"

run-nativeaot:
$(Q) $(MAKE) build BUILD_ARGUMENTS="/p:RuntimeIdentifier=ios-arm64 /p:PublishAot=true /p:MtouchLink=SdkOnly /p:Configuration=Release /bl:$@.binlog /t:Run"
1 change: 1 addition & 0 deletions tests/xharness/Jenkins/TestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ class TestData {
public string XamMacArch;
public string RuntimeIdentifier;
public string Registrar;
public bool PublishAot; // NativeAOT
}
}
5 changes: 5 additions & 0 deletions tests/xharness/Jenkins/TestVariationsFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ IEnumerable<TestData> GetTestData (RunTestTask test)
}
if (test.TestProject.IsDotNetProject)
yield return new TestData { Variation = "Release (LLVM)", Debug = false, UseLlvm = true, Ignored = ignore };
if (test.Platform == TestPlatform.iOS && test.TestProject.IsDotNetProject)
yield return new TestData { Variation = "Release (NativeAOT)", Debug = false, PublishAot = true, Ignored = ignore };
break;
case string name when name.StartsWith ("mscorlib", StringComparison.Ordinal):
if (supports_debug)
Expand Down Expand Up @@ -209,6 +211,7 @@ public IEnumerable<T> CreateTestVariations<T> (IEnumerable<T> tests, Func<MSBuil
var runtime_identifer = test_data.RuntimeIdentifier;
var use_llvm = test_data.UseLlvm;
var registrar = test_data.Registrar;
var publishaot = test_data.PublishAot;

if (task.TestProject.IsDotNetProject)
variation += " [dotnet]";
Expand Down Expand Up @@ -272,6 +275,8 @@ public IEnumerable<T> CreateTestVariations<T> (IEnumerable<T> tests, Func<MSBuil
clone.Xml.SetTopLevelPropertyGroupValue ("RuntimeIdentifier", runtime_identifer);
if (!string.IsNullOrEmpty (registrar))
clone.Xml.SetTopLevelPropertyGroupValue ("Registrar", registrar);
if (publishaot)
clone.Xml.SetTopLevelPropertyGroupValue ("PublishAot", "true");
clone.Xml.Save (clone.Path);
});

Expand Down

0 comments on commit 168ff42

Please sign in to comment.