From: Morgan Brown Date: Wed, 29 Aug 2018 11:25:57 +0000 (-0700) Subject: Fix IJW test failing on Linux (#19729) X-Git-Tag: accepted/tizen/unified/20190422.045933~1329 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbbfca3459519c21dbd94f9d8cd0bce26a5a1756;p=platform%2Fupstream%2Fcoreclr.git Fix IJW test failing on Linux (#19729) Disables the IJW test on Linux and ARM64 --- diff --git a/tests/src/Interop/CMakeLists.txt b/tests/src/Interop/CMakeLists.txt index 7318924..f2a480e 100644 --- a/tests/src/Interop/CMakeLists.txt +++ b/tests/src/Interop/CMakeLists.txt @@ -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) diff --git a/tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.cs b/tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.cs index 6f038e7..42fce46 100644 --- a/tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.cs +++ b/tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.cs @@ -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); diff --git a/tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.csproj b/tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.csproj index d5decf8..4afe388 100644 --- a/tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.csproj +++ b/tests/src/Interop/IJW/ManagedCallingNative/ManagedCallingNative.csproj @@ -10,6 +10,12 @@ Exe {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} ..\..\ + + + true + + + true diff --git a/tests/testsUnsupportedOutsideWindows.txt b/tests/testsUnsupportedOutsideWindows.txt index 0c4e8f0..aa56d76 100644 --- a/tests/testsUnsupportedOutsideWindows.txt +++ b/tests/testsUnsupportedOutsideWindows.txt @@ -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