Skip to content

Commit c210851

Browse files
lewingCopilot
andcommitted
Rename CoreClrConfigurationDetection.IsCoreClrInterpreter to IsInterpreterMode
Its meaning (an interpreter test mode) now differs from Utilities.IsCoreClrInterpreter and the library-test PlatformDetection.IsCoreClrInterpreter (no JIT, so some code may be interpreted). Give it a distinct name and document both. Co-authored-by: Copilot App <[email protected]>
1 parent 6af14b5 commit c210851

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/tests/Common/CoreCLRTestLibrary/CoreClrConfigurationDetection.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public static class CoreClrConfigurationDetection
2424
public static bool IsTieredCompilation => string.Equals(GetEnvironmentVariableValue("TieredCompilation", "1"), "1", StringComparison.InvariantCulture);
2525
public static bool IsHeapVerify => string.Equals(GetEnvironmentVariableValue("HeapVerify"), "1", StringComparison.InvariantCulture);
2626

27-
public static bool IsCoreClrInterpreter
27+
// An interpreter test mode (RuntimeTestModes.InterpreterActive): the interpreter is configured, or there is no JIT and the test is not ReadyToRun-compiled.
28+
public static bool IsInterpreterMode
2829
{
2930
get
3031
{

‎src/tests/Common/CoreCLRTestLibrary/Utilities.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,14 @@ public static bool IsWindowsIoTCore
100100
public static bool IsNativeAot => IsNotMonoRuntime && !IsReflectionEmitSupported;
101101
public static bool IsNotNativeAot => !IsNativeAot;
102102

103+
// No JIT, or the interpreter is configured: some code may be interpreted even when ReadyToRun-compiled.
103104
public static bool IsCoreClrInterpreter
104105
{
105106
get
106107
{
107108
if (RuntimeFeature.IsDynamicCodeSupported && !RuntimeFeature.IsDynamicCodeCompiled)
108109
return true;
109-
return CoreClrConfigurationDetection.IsCoreClrInterpreter;
110+
return CoreClrConfigurationDetection.IsInterpreterMode;
110111
}
111112
}
112113

‎src/tests/Common/XUnitWrapperGenerator/XUnitWrapperGenerator.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ private static ImmutableArray<ITestInfo> DecorateWithSkipOnCoreClrConfiguration(
10171017
}
10181018
if (skippedTestModes.HasFlag(Xunit.RuntimeTestModes.InterpreterActive))
10191019
{
1020-
conditions.Add($"!{ConditionClass}.IsCoreClrInterpreter");
1020+
conditions.Add($"!{ConditionClass}.IsInterpreterMode");
10211021
}
10221022

10231023
if (skippedTestModes.HasFlag(Xunit.RuntimeTestModes.AnyGCStress))

0 commit comments

Comments
 (0)