Skip to content

Commit 421f18f

Browse files
committed
[RISC-V] Restore IsNotQemuLinux, remove isQemu
1 parent 4fe6b04 commit 421f18f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

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

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static partial class PlatformDetection
3131

3232
public static bool IsMonoLinuxArm64 => IsMonoRuntime && IsLinux && IsArm64Process;
3333
public static bool IsNotMonoLinuxArm64 => !IsMonoLinuxArm64;
34-
public static bool IsQemuLinux => IsQemu();
34+
public static bool IsNotQemuLinux => !IsQemuLinux;
3535

3636
// OSX family
3737
public static bool IsApplePlatform => IsOSX || IsiOS || IstvOS || IsMacCatalyst;
@@ -112,6 +112,19 @@ public static bool OpenSslPresentOnSystem
112112
}
113113
}
114114

115+
public static bool IsQemuLinux
116+
{
117+
get
118+
{
119+
if (IsLinux)
120+
{
121+
return Environment.GetEnvironmentVariable("DOTNET_RUNNING_UNDER_QEMU") != null;
122+
}
123+
124+
return false;
125+
}
126+
}
127+
115128
private static Version s_opensslVersion;
116129
private static Version GetOpenSslVersion()
117130
{
@@ -303,15 +316,6 @@ private static bool IsDistroAndVersionOrHigher(Predicate<string> distroPredicate
303316
return false;
304317
}
305318

306-
private static bool IsQemu()
307-
{
308-
if (IsLinux)
309-
{
310-
return Environment.GetEnvironmentVariable("DOTNET_RUNNING_UNDER_QEMU") != null;
311-
}
312-
return false;
313-
}
314-
315319
private static bool VersionEquivalentTo(int major, int minor, int build, int revision, Version actualVersionId)
316320
{
317321
return (major == -1 || major == actualVersionId.Major)

0 commit comments

Comments
 (0)