-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[tests] Fix PlatformDetection.IsMonoInterpreter for mobile #59587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Checking for MONO_ENV_OPTIONS is not reliable for the mobile test runners because they use the embedding API to enable the interpreter, rather than setting an environment option. Instead detect the interpreter by checking the values of the IsDynamicCodeSupported and IsDynamicCodeCompiled runtime features.
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Tagging subscribers to this area: @directhex Issue DetailsChecking for Instead detect the interpreter by checking the values of the Re-enable the Fixes #52460
|
| // This is a temporary solution because mono does not support interpreter detection | ||
| // within the runtime. | ||
| var val = Environment.GetEnvironmentVariable("MONO_ENV_OPTIONS"); | ||
| return (val != null && val.Contains("--interpreter")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also remove it from eng/pipelines/coreclr/templates/run-performance-job.yml and src/tests/Common/testenvironment.proj?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. We still need to set it when we're running on desktop platforms using Mono, since in that case we're just using the normal libraries test host.
The issue is just that it's not sufficient to check for the environment variable setting to detect whether we're using the interpreter. The RuntimeFeature checks should be accurate on all configurations, AFAIK.
these tests are not running on mono if they're running on .NET Framework
Checking for
MONO_ENV_OPTIONSis not reliable for the mobile test runners because they use the embedding API to enable the interpreter, rather than setting an environment variable.Instead detect the interpreter by checking the values of the
IsDynamicCodeSupportedandIsDynamicCodeCompiledruntime features.Re-enable the
System.Threading.Tasks.Dataflow.Teststestsuite on Apple platformsFixes #52460