未验证 提交 26b90d39 编写于 作者: M Michal Strehovský 提交者: GitHub

Pass over interop tests with NativeAOT (#74627)

* Mark tests as NativeAotIncompatible in project file instead of disabling in issues.targets so that we don't even build them.
* Tweak for COM disabled
* Block some tests on a new issue
上级 78e41f83
......@@ -95,6 +95,7 @@
<_WillCLRTestProjectBuild Condition="'$(BuildAllProjects)' == 'true' And '$(CLRTestPriority)' &lt;= '$(CLRTestPriorityToBuild)'">true</_WillCLRTestProjectBuild>
<_WillCLRTestProjectBuild Condition="'$(CLRTestBuildAllTargets)' != 'allTargets' And '$(CLRTestTargetUnsupported)' == 'true'">false</_WillCLRTestProjectBuild>
<_WillCLRTestProjectBuild Condition="'$(DisableProjectBuild)' == 'true'">false</_WillCLRTestProjectBuild>
<_WillCLRTestProjectBuild Condition="'$(NativeAotIncompatible)' == 'true' and '$(TestBuildMode)' == 'nativeaot'">false</_WillCLRTestProjectBuild>
</PropertyGroup>
<PropertyGroup>
<_CopyNativeProjectBinaries Condition="'$(__CopyNativeTestBinaries)' != '1'">$(__CopyNativeProjectsAfterCombinedTestBuild)</_CopyNativeProjectBinaries>
......
......@@ -4,8 +4,8 @@
<RequiresMockHostPolicy>true</RequiresMockHostPolicy>
<!-- The test fails casting from ClassFromA from the default ALC to type IGetTypeFromC from a custom ALC -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
<DisableProjectBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</DisableProjectBuild>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.cs" />
......
......@@ -4,8 +4,8 @@
<RequiresMockHostPolicy>true</RequiresMockHostPolicy>
<!-- The test fails casting from ClassFromA from the default ALC to type IGetTypeFromC from a custom ALC -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
<DisableProjectBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</DisableProjectBuild>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="Program.cs" />
......
......@@ -8,6 +8,7 @@ namespace ComWrappersTests
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using TestLibrary;
using Xunit;
static class WeakReferenceNative
......@@ -273,7 +274,7 @@ static int Main(string[] doNotUse)
{
try
{
if (OperatingSystem.IsWindows())
if (PlatformDetection.IsBuiltInComEnabled)
{
ValidateNonComWrappers();
......
......@@ -6,6 +6,8 @@
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
<!-- ilasm round-trip testing blocked on ILAsm supporting embedding resources. See https://github.com/dotnet/runtime/issues/11412 -->
<IlasmRoundTripIncompatible>true</IlasmRoundTripIncompatible>
<!-- The tests are unhappy with where we lay out the executable -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<PropertyGroup Condition="'$(UseManagedCOMServer)' == 'true'">
......
......@@ -2,6 +2,7 @@
<PropertyGroup>
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="ExtensionPoints.cs" />
......
......@@ -8,6 +8,7 @@
<!-- The entry point for these tests is native and the produced assembly is a no-op, so unloadability testing doesn't do anything here. -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
<CLRTestIsHosted>false</CLRTestIsHosted>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
......
......@@ -2,6 +2,7 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildProjectName).cs" />
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<DisableProjectBuild Condition="'$(RuntimeFlavor)' == 'Mono'">true</DisableProjectBuild>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="Castable.cs" />
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- IJW is Windows-only -->
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<!-- IJW is not supported on ARM64 -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'arm64'">true</CLRTestTargetUnsupported>
<!-- Loading IJW assemblies into an unloadable context is not allowed -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<PropertyGroup>
<CopyDebugCRTDllsToOutputDirectory>true</CopyDebugCRTDllsToOutputDirectory>
......
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props, $(MSBuildThisFileDirectory)..))" />
<PropertyGroup>
<!-- IJW is Windows-only -->
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<!-- IJW is not supported on ARM64 -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'arm64'">true</CLRTestTargetUnsupported>
<!-- Loading IJW assemblies into an unloadable context is not allowed -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
<!-- C++/CLI not supported with NativeAOT -->
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- IJW is Windows-only -->
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<!-- IJW is not supported on ARM64 -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'arm64'">true</CLRTestTargetUnsupported>
<!-- Loading IJW assemblies into an unloadable context is not allowed -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<PropertyGroup>
<CopyDebugCRTDllsToOutputDirectory>true</CopyDebugCRTDllsToOutputDirectory>
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- IJW is Windows-only -->
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<!-- IJW is not supported on ARM64 -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'arm64'">true</CLRTestTargetUnsupported>
<!-- Loading IJW assemblies into an unloadable context is not allowed -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<PropertyGroup>
<CopyDebugCRTDllsToOutputDirectory>true</CopyDebugCRTDllsToOutputDirectory>
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- IJW is Windows-only -->
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<!-- IJW is not supported on ARM64 -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'arm64'">true</CLRTestTargetUnsupported>
<!-- Loading IJW assemblies into an unloadable context is not allowed -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<PropertyGroup>
<CopyDebugCRTDllsToOutputDirectory>true</CopyDebugCRTDllsToOutputDirectory>
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<!-- IJW is Windows-only -->
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<!-- IJW is not supported on ARM64 -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'arm64'">true</CLRTestTargetUnsupported>
<!-- Native varargs not supported on ARM -->
<CLRTestTargetUnsupported Condition="'$(TargetArchitecture)' == 'arm' or '$(TargetArchitecture)' == 'armel'">true</CLRTestTargetUnsupported>
<!-- Loading IJW assemblies into an unloadable context is not allowed -->
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
</PropertyGroup>
<PropertyGroup>
<CopyDebugCRTDllsToOutputDirectory>true</CopyDebugCRTDllsToOutputDirectory>
......
......@@ -3,6 +3,7 @@
<OutputType>Exe</OutputType>
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="IUnknownTest.cs" />
......
......@@ -3,6 +3,7 @@
<OutputType>Exe</OutputType>
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestInALC.cs" />
......
......@@ -4,6 +4,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- CustomMarshalers unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="*.cs" />
......
......@@ -3,6 +3,7 @@
<OutputType>Exe</OutputType>
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyTrueTest.cs" />
......
......@@ -3,6 +3,7 @@
<OutputType>Exe</OutputType>
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyWithoutComVisibleTest.cs" />
......
......@@ -3,6 +3,7 @@
<OutputType>Exe</OutputType>
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="DefaultTest.cs" />
......
......@@ -3,6 +3,7 @@
<OutputType>Exe</OutputType>
<!-- Test unsupported outside of windows -->
<CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
<NativeAotIncompatible>true</NativeAotIncompatible>
</PropertyGroup>
<ItemGroup>
<Compile Include="TestInALC.cs" />
......
......@@ -943,9 +943,6 @@
<ExcludeList Include="$(XunitTestBinBase)/baseservices/RuntimeConfiguration/TestConfig/*">
<Issue>Test expects being run with corerun</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/ICastable/Castable/*">
<Issue>ICastable is CoreCLR specific</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/JIT/Directed/debugging/debuginfo/tester/*">
<Issue>Just-in-time compilation test</Issue>
</ExcludeList>
......@@ -1003,27 +1000,24 @@
<ExcludeList Include="$(XunitTestBinBase)/Interop/ArrayMarshalling/SafeArray/SafeArrayTest/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: SAFEARRAY</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/COM/**/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: COM</Issue>
<ExcludeList Include="$(XunitTestBinBase)/Interop/COM/ComWrappers/API/ComWrappersTests/*">
<Issue>https://github.com/dotnet/runtime/issues/74620</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/ExecInDefAppDom/ExecInDefAppDom/*">
<Issue>Specific to CoreCLR</Issue>
<ExcludeList Include="$(XunitTestBinBase)/Interop/COM/ComWrappers/API/ComWrappersTestsBuiltInComDisabled/*">
<Issue>https://github.com/dotnet/runtime/issues/74620</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/COM/ComWrappers/WeakReference/WeakReferenceTest/*">
<Issue>https://github.com/dotnet/runtime/issues/74620</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/ICustomMarshaler/ConflictingNames/MultipleALCs/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: AssemblyLoadContext.LoadFromAssemblyPath</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/IJW/**/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: C++/CLI</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/LayoutClass/LayoutClassTest/*">
<Issue>https://github.com/dotnet/runtimelab/issues/163</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/MarshalAPI/FunctionPointer/FunctionPtrTest/*">
<Issue>https://github.com/dotnet/runtimelab/issues/164</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/MarshalAPI/IUnknown/**/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: COM</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/NativeLibrary/API/NativeLibraryTests/*">
<Issue>https://github.com/dotnet/runtimelab/issues/165</Issue>
</ExcludeList>
......@@ -1057,9 +1051,6 @@
<ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/CriticalHandles/**/*">
<Issue>https://github.com/dotnet/runtimelab/issues/173</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/CustomMarshalers/CustomMarshalersTest/*">
<Issue>Specific to CoreCLR: Built-in COM Interop</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/Decimal/DecimalTest/*">
<Issue>https://github.com/dotnet/runtimelab/issues/175</Issue>
</ExcludeList>
......@@ -1075,9 +1066,6 @@
<ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorTest/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: C++/CLI</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/NativeCallManagedComVisible/**/*">
<Issue>https://github.com/dotnet/runtimelab/issues/155: COM</Issue>
</ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/Interop/PInvoke/SafeHandles/SafeHandleTests/*">
<Issue>https://github.com/dotnet/runtimelab/issues/168</Issue>
</ExcludeList>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册