Fix IJW test failing on Linux (#19729)
authorMorgan Brown <morganbr@users.noreply.github.com>
Wed, 29 Aug 2018 11:25:57 +0000 (04:25 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Aug 2018 11:25:57 +0000 (04:25 -0700)
Disables the IJW test on Linux and ARM64

tests/src/Interop/CMakeLists.txt
tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.cs
tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.csproj
tests/testsUnsupportedOutsideWindows.txt

index 7318924..f2a480e 100644 (file)
@@ -34,5 +34,9 @@ add_subdirectory(DllImportAttribute/Simple)
 if(WIN32)
     add_subdirectory(COM/NativeServer)
     add_subdirectory(IJW/FakeMscoree)
-    add_subdirectory(IJW/ManagedCallingNative/IjwNativeDll)
+
+    # IJW isn't supported on ARM64
+    if(NOT CLR_CMAKE_PLATFORM_ARCH_ARM64)
+        add_subdirectory(IJW/ManagedCallingNative/IjwNativeDll)
+    endif()
 endif(WIN32)
index 6f038e7..42fce46 100644 (file)
@@ -14,6 +14,11 @@ namespace ManagedCallingNative
     {
         static int Main(string[] args)
         {
+            if(Environment.OSVersion.Platform != PlatformID.Win32NT)
+            {
+                return 100;
+            }
+
             bool success = true;
             // Load a fake mscoree.dll to avoid starting desktop
             LoadLibraryEx(Path.Combine(Environment.CurrentDirectory, "mscoree.dll"), IntPtr.Zero, 0);
index d5decf8..4afe388 100644 (file)
     <OutputType>Exe</OutputType>
     <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+    
+    <!-- IJW is Windows-only -->
+    <TestUnsupportedOutsideWindows>true</TestUnsupportedOutsideWindows>
+
+    <!-- IJW is not supported on ARM64 -->
+    <DisableProjectBuild Condition="'$(Platform)' == 'arm64'">true</DisableProjectBuild>
   </PropertyGroup>
   <!-- Default configurations to help VS understand the configurations -->
   <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
index 0c4e8f0..aa56d76 100644 (file)
@@ -126,7 +126,6 @@ GC/Coverage/smalloom/smalloom.sh
 Interop/COM/NETClients/Primitives/NETClientPrimitives/NETClientPrimitives.sh
 Interop/MarshalAPI/IUnknown/IUnknownTest/IUnknownTest.sh
 Interop/SizeConst/SizeConstTest/SizeConstTest.sh
-Interop/IJW/ManagedCallingNative/ManagedCallingNative/ManagedCallingNative.sh
 JIT/Directed/coverage/oldtests/callipinvoke/callipinvoke.sh
 JIT/Directed/coverage/oldtests/Desktop/callipinvoke_il_d/callipinvoke_il_d.sh
 JIT/Directed/coverage/oldtests/Desktop/callipinvoke_il_r/callipinvoke_il_r.sh