Skip to content

Commit 05edcc6

Browse files
directhexpremunsafern
authored
Add test leg to the PR build to run libraries tests on Android devices (#42209)
The on-device version of #37585 Co-authored-by: Premek Vysoky <premek.vysoky@microsoft.com> Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
1 parent cec89fd commit 05edcc6

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

eng/pipelines/libraries/helix-queues-setup.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ jobs:
9494
# Android
9595
- ${{ if in(parameters.platform, 'Android_x86', 'Android_x64') }}:
9696
- Ubuntu.1804.Amd64.Android.Open
97+
- ${{ if in(parameters.platform, 'Android_arm', 'Android_arm64') }}:
98+
- Windows.10.Amd64.Android.Open
9799

98100
# iOS x64/x86
99101
- ${{ if in(parameters.platform, 'iOS_x64', 'iOS_x86') }}:

eng/pipelines/runtime.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ jobs:
264264
runtimeFlavor: mono
265265
platforms:
266266
- Android_x86
267-
- Android_arm64
268267
- tvOS_x64
269268
- iOS_arm64
270269
- iOS_x86
@@ -354,6 +353,7 @@ jobs:
354353
buildConfig: Release
355354
runtimeFlavor: mono
356355
platforms:
356+
- Android_arm64
357357
- Android_x64
358358
- iOS_x64
359359
variables:

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ public static partial class PlatformDetection
4747
public static bool IsNotFedoraOrRedHatFamily => !IsFedora && !IsRedHatFamily;
4848
public static bool IsNotDebian10 => !IsDebian10;
4949

50+
// Android
51+
public static bool IsAndroid => RuntimeInformation.IsOSPlatform(OSPlatform.Create("Android"));
52+
5053
public static bool IsSuperUser => IsBrowser || IsWindows ? false : libc.geteuid() == 0;
5154

5255
public static Version OpenSslVersion => !IsOSXLike && !IsWindows ?

src/libraries/System.IO.FileSystem.DriveInfo/tests/DriveInfo.Unix.Tests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void PropertiesOfInvalidDrive()
6060
}
6161

6262
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsSubsystemForLinux))] // https://github.com/dotnet/runtime/issues/18487
63-
[PlatformSpecific(TestPlatforms.AnyUnix)]
63+
[PlatformSpecific(TestPlatforms.AnyUnix & ~TestPlatforms.Android)]
6464
public void PropertiesOfValidDrive()
6565
{
6666
var root = new DriveInfo("/");

0 commit comments

Comments
 (0)