Skip building interop test native assets for Windows-only tests on non-Windows (...
authorElinor Fung <elfung@microsoft.com>
Wed, 20 Oct 2021 21:09:52 +0000 (14:09 -0700)
committerGitHub <noreply@github.com>
Wed, 20 Oct 2021 21:09:52 +0000 (14:09 -0700)
src/tests/Interop/CMakeLists.txt
src/tests/Interop/ExecInDefAppDom/ExecInDefAppDom.csproj
src/tests/issues.targets

index 30a1e9e..1914910 100644 (file)
@@ -14,8 +14,6 @@ SET(CLR_INTEROP_TEST_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
 include_directories(common)
 add_subdirectory(PInvoke/Decimal)
 add_subdirectory(PInvoke/ArrayWithOffset)
-add_subdirectory(PInvoke/BestFitMapping/Char)
-add_subdirectory(PInvoke/BestFitMapping/LPStr)
 add_subdirectory(PInvoke/Delegate)
 add_subdirectory(PInvoke/Primitives/Int)
 add_subdirectory(PInvoke/Primitives/RuntimeHandles)
@@ -55,16 +53,18 @@ add_subdirectory(StringMarshalling/BSTR)
 add_subdirectory(StringMarshalling/AnsiBSTR)
 add_subdirectory(StringMarshalling/VBByRefStr)
 add_subdirectory(MarshalAPI/FunctionPointer)
-add_subdirectory(MarshalAPI/IUnknown)
 add_subdirectory(NativeLibrary/NativeLibraryToLoad)
 add_subdirectory(DllImportAttribute/DllImportPath)
 add_subdirectory(DllImportAttribute/ExactSpelling)
-add_subdirectory(ExecInDefAppDom)
 add_subdirectory(ICustomMarshaler/ConflictingNames)
 add_subdirectory(LayoutClass)
 add_subdirectory(PInvoke/DateTime)
 if(CLR_CMAKE_TARGET_WIN32)
+    add_subdirectory(ExecInDefAppDom)
+    add_subdirectory(MarshalAPI/IUnknown)
     add_subdirectory(PInvoke/Attributes/LCID)
+    add_subdirectory(PInvoke/BestFitMapping/Char)
+    add_subdirectory(PInvoke/BestFitMapping/LPStr)
     add_subdirectory(PInvoke/Variant)
     add_subdirectory(PInvoke/Varargs)
     add_subdirectory(PInvoke/NativeCallManagedComVisible)
index 0a0137d..1e10117 100644 (file)
@@ -1,6 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <OutputType>Exe</OutputType>
+    <CLRTestTargetUnsupported Condition="'$(TargetsWindows)' != 'true'">true</CLRTestTargetUnsupported>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="$(MSBuildProjectName).cs" />
index 37f4d26..4b51bda 100644 (file)
@@ -73,9 +73,6 @@
          <ExcludeList Include="$(XunitTestBinBase)/JIT/Directed/arglist/vararg_TargetUnix/*">
             <Issue>https://github.com/dotnet/runtime/issues/10478 </Issue>
         </ExcludeList>
-        <ExcludeList Include="$(XunitTestBinBase)/Interop/ExecInDefAppDom/ExecInDefAppDom/*">
-            <Issue>Issue building native components for the test.</Issue>
-        </ExcludeList>
     </ItemGroup>
 
     <!-- All Unix targets  on CoreCLR Runtime -->