diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml
index c2f754d6ee2385..776cdae314c429 100644
--- a/eng/pipelines/common/platform-matrix.yml
+++ b/eng/pipelines/common/platform-matrix.yml
@@ -25,6 +25,7 @@ parameters:
jobs:
# Linux arm
+
- ${{ if or(containsValue(parameters.platforms, 'linux_arm'), in(parameters.platformGroup, 'all', 'gcstress')) }}:
- template: xplat-setup.yml
parameters:
@@ -45,6 +46,7 @@ jobs:
${{ insert }}: ${{ parameters.jobParameters }}
# Linux armv6
+
- ${{ if containsValue(parameters.platforms, 'linux_armv6') }}:
- template: xplat-setup.yml
parameters:
diff --git a/eng/pipelines/coreclr/crossgen2.yml b/eng/pipelines/coreclr/crossgen2.yml
index bc15a00d3c5351..53ea5878d32ce6 100644
--- a/eng/pipelines/coreclr/crossgen2.yml
+++ b/eng/pipelines/coreclr/crossgen2.yml
@@ -60,6 +60,29 @@ extends:
displayNameArgs: R2R_CG2
liveLibrariesBuildConfig: Release
+ - template: /eng/pipelines/common/platform-matrix.yml
+ parameters:
+ jobTemplate: /eng/pipelines/common/global-build-job.yml
+ helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
+ buildConfig: Release
+ platforms:
+ - linux_x64
+ - osx_x64
+ - windows_x64
+ jobParameters:
+ testGroup: innerloop
+ buildArgs: -s clr+libs+libs.tests
+ -c $(_BuildConfig)
+ /p:TestReadyToRun=true
+ /p:ArchiveTests=true
+ nameSuffix: TestReadyToRun_Libraries
+ timeoutInMinutes: 360
+ postBuildSteps:
+ - template: /eng/pipelines/libraries/helix.yml
+ parameters:
+ creator: dotnet-bot
+ testRunNamePrefixSuffix: TestReadyToRun_$(_BuildConfig)
+
# Run pri0 tests with hot/cold splitting enabled (only supported on x64 at the moment)
# TODO: test on arm64 once supported
- template: /eng/pipelines/common/platform-matrix.yml
diff --git a/eng/testing/tests.singlefile.targets b/eng/testing/tests.singlefile.targets
index 804b6745356ab5..9e6e4d0b3589e4 100644
--- a/eng/testing/tests.singlefile.targets
+++ b/eng/testing/tests.singlefile.targets
@@ -70,6 +70,10 @@
$(DefineConstants);SINGLE_FILE_TEST_RUNNER
+
+ $(DefineConstants);TEST_READY_TO_RUN_COMPILED
+
+
@@ -106,6 +110,114 @@
+
+
+
+ $(ArtifactsObjDir)Microsoft.NETCore.App.Bundle/
+ $(ArtifactsNetCoreAppBundlePath)$(Configuration)/$(NetCoreAppCurrent)/$(OutputRID)/output/
+ $(ArtifactsNetCoreAppBundlePath)shared/$(MicrosoftNetCoreAppFrameworkName)/$(PackageVersion)/
+
+
+
+ <_BundleAssembliesToCopy Include="$(ArtifactsNetCoreAppBundlePath)*.dll" />
+
+
+
+
+
+
+
+ <_ReadyToRunAssembliesToReference Include="@(_BundleAssembliesToCopy)" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ResolvedFileToPublishPreserveNewest
+ Remove="@(_ResolvedFileToPublishPreserveNewest->WithMetadataValue('Extension', '.dbg'))" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
diff --git a/src/libraries/Common/tests/SingleFileTestRunner/SingleFileTestRunner.cs b/src/libraries/Common/tests/SingleFileTestRunner/SingleFileTestRunner.cs
index 8afbf22547dddd..0cb4c94e4c8d12 100644
--- a/src/libraries/Common/tests/SingleFileTestRunner/SingleFileTestRunner.cs
+++ b/src/libraries/Common/tests/SingleFileTestRunner/SingleFileTestRunner.cs
@@ -30,6 +30,17 @@ public static int Main(string[] args)
// The current RemoteExecutor implementation is not compatible with the SingleFileTestRunner.
Environment.SetEnvironmentVariable("DOTNET_REMOTEEXECUTOR_SUPPORTED", "0");
+ // To detect ReadyToRun testing mode, we set a constant in
+ // eng/testing/tests.singlefile.targets, which we use in the following
+ // preprocessor directive. In the case that it is defined, we set an
+ // environment variable that we consume later to implement
+ // PlatformDetection.IsReadyToRunCompiled. This last value is used for the
+ // [ActiveIssue] annotations designed to exclude tests from running.
+
+#if TEST_READY_TO_RUN_COMPILED
+ Environment.SetEnvironmentVariable("TEST_READY_TO_RUN_MODE" ,"1");
+#endif
+
var diagnosticSink = new ConsoleDiagnosticMessageSink();
var testsFinished = new TaskCompletionSource();
var testSink = new TestMessageSink();
diff --git a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
index a33f7a09f2df2c..6f2f4d05beecf2 100644
--- a/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
+++ b/src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
@@ -211,6 +211,8 @@ private static bool GetLinqExpressionsBuiltWithIsInterpretingOnly()
public static bool HasHostExecutable => HasAssemblyFiles; // single-file don't have a host
public static bool IsSingleFile => !HasAssemblyFiles;
+ public static bool IsReadyToRunCompiled => Environment.GetEnvironmentVariable("TEST_READY_TO_RUN_MODE") == "1";
+
private static volatile Tuple s_lazyNonZeroLowerBoundArraySupported;
public static bool IsNonZeroLowerBoundArraySupported
{
diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props
index 32fc46a35d8d7c..af6fc30ae1ba87 100644
--- a/src/libraries/Directory.Build.props
+++ b/src/libraries/Directory.Build.props
@@ -85,6 +85,10 @@
true
+
+ true
+
+
--interpreter
diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/EnumTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/EnumTests.cs
index 2f8dd8ac19074e..9bbe8ff5317d2b 100644
--- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/EnumTests.cs
+++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/EnumTests.cs
@@ -1599,6 +1599,7 @@ public void GetValues_EnumTypeNotEnum_ThrowsArgumentException(Type enumType)
private class ClassWithEnumConstraint where T : Enum { }
[Fact]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/94189", typeof(PlatformDetection), nameof(PlatformDetection.IsReadyToRunCompiled))]
public void EnumConstraint_ThrowsArgumentException()
{
Type genericArgumentWithEnumConstraint = typeof(ClassWithEnumConstraint<>).GetGenericArguments()[0];
diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs
index 239bceb52effe9..a472c3668c02cc 100644
--- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs
+++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Runtime/JitInfoTests.cs
@@ -100,6 +100,7 @@ public void JitInfoIsNotPopulated()
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported))]
[SkipOnMono("Mono does not track thread specific JIT information")]
+ [ActiveIssue("https://github.com/dotnet/runtime/issues/94189", typeof(PlatformDetection), nameof(PlatformDetection.IsReadyToRunCompiled))]
public void JitInfoCurrentThreadIsPopulated()
{
TimeSpan t1_beforeCompilationTime = TimeSpan.Zero;
diff --git a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Type/TypeTests.Get.cs b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Type/TypeTests.Get.cs
index 478d23e236a7a2..e6dfe3a0cb4e8b 100644
--- a/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Type/TypeTests.Get.cs
+++ b/src/libraries/System.Runtime/tests/System.Runtime.Tests/System/Type/TypeTests.Get.cs
@@ -55,6 +55,7 @@ public static IEnumerable