[clr-ios] Run full test suite on Apple mobile platforms#123033
[clr-ios] Run full test suite on Apple mobile platforms#123033kotlarmilos wants to merge 48 commits intodotnet:mainfrom
Conversation
|
/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| return (appContextKeys.ToString().TrimEnd(), appContextValues.ToString().TrimEnd(), propertyCount, propertyCountInvariant); | ||
| } | ||
|
|
||
| private Dictionary<string, string> ParseRuntimeConfigProperties(string workspace) |
There was a problem hiding this comment.
Consider adding a documentation comment for this method similar to the one in AndroidAppBuilder.ApkBuilder.cs (lines 709-711), which explains: "This method reads the binary runtimeconfig.bin file created by RuntimeConfigParserTask.ConvertDictionaryToBlob. The binary format is: compressed integer count, followed by count pairs of length-prefixed UTF8 strings (key, value). See src/tasks/MonoTargetsTasks/RuntimeConfigParser/RuntimeConfigParser.cs for the corresponding write logic." This would improve code maintainability and help future developers understand the binary format being parsed.
|
/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| public static bool IsMonoAOT => Environment.GetEnvironmentVariable("MONO_AOT_MODE") == "aot"; | ||
| public static bool IsNotMonoAOT => Environment.GetEnvironmentVariable("MONO_AOT_MODE") != "aot"; | ||
| public static bool IsNativeAot => IsNotMonoRuntime && !IsReflectionEmitSupported; | ||
| public static bool IsNativeAot => IsNotMonoRuntime && typeof(object).Assembly.GetType("Internal.Runtime.CompilerHelpers.StartupCodeHelpers") is not null; |
There was a problem hiding this comment.
I would expect RuntimeFeature.IsDynamicCodeSupported and IsReflectionEmitSupported to return true on CoreCLR (without NativeAOT).
Why do we need this change?
There was a problem hiding this comment.
On Apple mobile platforms IsDynamicCodeSupported should be false. This causes IsNativeAot to evaluate to true because IsNativeAot => IsNotMonoRuntime && !IsReflectionEmitSupported.
IsCoreCLR is defined as IsNotMonoRuntime && IsNotNativeAot and because IsNativeAot seems to be true on Apple mobile CoreCLR platforms, IsCoreCLR evaluates to false.
As a result Apple mobile CoreCLR ends up being classified as NativeAOT. I am now testing it on the CI.
There was a problem hiding this comment.
On Apple mobile platforms IsDynamicCodeSupported should be false
It does not sound right to me. This property should be true when e.g. Reflection.Emit is supported. (There is another property IsDynamicCodeCompiled - this one should be false with interpreter.)
Is it like that on Mono? I guess we can keep it like that for compatibility with Mono, but it does make it right.
There was a problem hiding this comment.
Ok, thanks. This is currently overridden in the repo as:
<DynamicCodeSupport Condition="'$(DynamicCodeSupport)' == '' and '$(MonoForceInterpreter)' != 'true'">false</DynamicCodeSupport>
Let’s fix this properly rather than keeping as Mono workaround.
|
/azp run runtime-ioslike,runtime-ioslikesimulator,runtime-maccatalyst |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Description
This PR enables runtime and library tests on Apple mobile platforms. All runtime tests are passing, and 195 out of 215 library test suites pass successfully. Disabled tests are tracked in #124344.
Fixes #120055