Skip to content

Commit 2705fc0

Browse files
safernakoeplinger
andauthored
[release/5.0] Port ICU tests fix for server core x86 (#65039)
* [release/5.0] Port ICU tests fix for server core x86 * Remove additional brace * Add PlatformDetection.IsX86Process Co-authored-by: Alexander Köplinger <[email protected]>
1 parent efa7217 commit 2705fc0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public static partial class PlatformDetection
4040
public static bool IsNotArm64Process => !IsArm64Process;
4141
public static bool IsArmOrArm64Process => IsArmProcess || IsArm64Process;
4242
public static bool IsNotArmNorArm64Process => !IsArmOrArm64Process;
43+
public static bool IsX86Process => RuntimeInformation.ProcessArchitecture == Architecture.X86;
4344
public static bool IsArgIteratorSupported => IsMonoRuntime || (IsWindows && IsNotArmProcess);
4445
public static bool IsArgIteratorNotSupported => !IsArgIteratorSupported;
4546
public static bool Is32BitProcess => IntPtr.Size == 4;

src/libraries/System.Globalization/tests/IcuTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ namespace System.Globalization.Tests
1010
public class IcuTests
1111
{
1212
private static bool IsIcuCompatiblePlatform => PlatformDetection.IsNotWindows ||
13-
PlatformDetection.IsWindows10Version1903OrGreater;
13+
PlatformDetection.IsWindows10Version1903OrGreater &&
14+
// Server core doesn't have icu.dll on SysWOW64
15+
!(PlatformDetection.IsWindowsServerCore && PlatformDetection.IsX86Process);
1416

1517
[ConditionalFact(nameof(IsIcuCompatiblePlatform))]
1618
public static void IcuShouldBeUsedByDefault()

0 commit comments

Comments
 (0)