Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions eng/testing/tests.readytorun.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<!-- Override the path to the in-tree crossgen2. -->
<Target Name="ResolveReadyToRunCompilers">
<PropertyGroup>
<Crossgen2Path>$([MSBuild]::NormalizePath('$(Crossgen2InBuildDir)', 'crossgen2$(ExeSuffix)'))</Crossgen2Path>
<_CrossGenTargetOS Condition="'$(TargetsAndroid)' != 'true'">$(TargetOS)</_CrossGenTargetOS>
<_CrossGenTargetOS Condition="'$(TargetsAndroid)' == 'true'">linux</_CrossGenTargetOS>
</PropertyGroup>

<ItemGroup>
<Crossgen2Tool Include="$(Crossgen2Path)"
TargetArch="$(TargetArchitecture)"
TargetOS="$(_CrossGenTargetOS)"
PerfmapFormatVersion="$(PublishReadyToRunPerfmapFormatVersion)"/>
</ItemGroup>
</Target>
</Project>
31 changes: 8 additions & 23 deletions eng/testing/tests.singlefile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<PropertyGroup Condition="'$(TestReadyToRun)' == 'true'">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishSingleFile>false</PublishSingleFile>
<AfterMicrosoftNETSdkTargets>$(AfterMicrosoftNETSdkTargets);$(MSBuildThisFileDirectory)tests.readytorun.targets</AfterMicrosoftNETSdkTargets>
</PropertyGroup>

<PropertyGroup Condition="'$(TestNativeAot)' == 'true'">
Expand Down Expand Up @@ -92,7 +93,13 @@

<ItemGroup>
<_BundleAssembliesToCopy Include="$(ArtifactsNetCoreAppBundlePath)*.dll" />
<ResolvedFileToPublish Remove="@(_BundleAssembliesToCopy)" MatchOnMetadata="Filename" />
<!-- Only remove files from the shared framework that match existing R2R binaries. Otherwise we can remove an OOB that goes forward of the framework's assembly. -->
<ResolvedFileToPublish Remove="@(_BundleAssembliesToCopy->'$(MicrosoftNetCoreAppRuntimePackRidLibTfmDir)%(Filename)%(Extension)')" />
<!--
If there's any OOB assemblies that we're still referencing, make sure that we don't overwrite them with the assemblies from the bundle.
Filter for CopyLocal=true assets to ensure we're not grabbing "Content" or "None" items here.
-->
<_BundleAssembliesToCopy Remove="@(ResolvedFileToPublish->WithMetadataValue('CopyLocal','true'))" MatchOnMetadata="Filename;Extension" />
</ItemGroup>
</Target>

Expand Down Expand Up @@ -160,28 +167,6 @@

</Target>

<!--
There are a few tests that need a 'live-ref-pack', which is missing from the
publish directory in TestReadyToRun builds. This target copies it there.
-->
<Target Name="CopyLiveRefPackIfPresent"
Condition="'$(TestReadyToRun)' == 'true'"
AfterTargets="CopyExistingR2RBinaries">

<ItemGroup>
<OutDirLiveRefPackFiles Include="$(OutDir)live-ref-pack/*" />
</ItemGroup>

<Copy SourceFiles="@(OutDirLiveRefPackFiles)"
DestinationFolder="$(PublishDir)live-ref-pack"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)" />

</Target>

<Target Name="__UpdateExcludedAssembliesFromSingleFile"
Inputs="ExcludeFromSingleFile"
Outputs="ResolvedFileToPublish"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,7 @@ private static void ExecuteAndUnload(string assemblyfile, Action<Assembly> assem
// loaded in the default ALC, which causes problems for this test.
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsAssemblyLoadingSupported), nameof(PlatformDetection.IsNotMobile))]
[ActiveIssue("34072", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/95928", typeof(PlatformDetection), nameof(PlatformDetection.IsReadyToRunCompiled))]
public static void TypeDescriptor_WithDefaultProvider_UnloadsUnloadableTypes()
{
ExecuteAndUnload("UnloadableTestTypes.dll",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2568,6 +2568,7 @@ public static void Xml_TypeWithSpecialCharacterInStringMember()
[SkipOnPlatform(TestPlatforms.Browser, "AssemblyDependencyResolver not supported in wasm")]
#endif
[ActiveIssue("https://github.com/dotnet/runtime/issues/34072", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/95928", typeof(PlatformDetection), nameof(PlatformDetection.IsReadyToRunCompiled))]
public static void Xml_TypeInCollectibleALC()
{
ExecuteAndUnload("SerializableAssembly.dll", "SerializationTypes.SimpleType", out var weakRef);
Expand Down
Loading