Skip to content

Commit 7be653f

Browse files
[Android] Run CoreCLR functional tests on Android (#112283)
* Setup a new job to run CoreCLR functional tests on Android --------- Co-authored-by: Ivan Povazan <[email protected]>
1 parent 938f546 commit 7be653f

File tree

3 files changed

+79
-1
lines changed

3 files changed

+79
-1
lines changed

eng/pipelines/extra-platforms/runtime-extra-platforms-androidemulator.yml

+32
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,35 @@ jobs:
118118
parameters:
119119
creator: dotnet-bot
120120
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
121+
122+
#
123+
# Android emulators
124+
# Build the whole product using CoreCLR and run libraries tests
125+
#
126+
- template: /eng/pipelines/common/platform-matrix.yml
127+
parameters:
128+
jobTemplate: /eng/pipelines/common/global-build-job.yml
129+
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
130+
buildConfig: Release
131+
runtimeFlavor: coreclr
132+
platforms:
133+
- android_x64
134+
- android_arm64
135+
variables:
136+
# map dependencies variables to local variables
137+
- name: librariesContainsChange
138+
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
139+
- name: coreclrContainsChange
140+
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ]
141+
jobParameters:
142+
testGroup: innerloop
143+
nameSuffix: AllSubsets_CoreCLR
144+
isExtraPlatforms: ${{ parameters.isExtraPlatformsBuild }}
145+
buildArgs: -s clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs+libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:TestAssemblies=false
146+
timeoutInMinutes: 180
147+
# extra steps, run tests
148+
postBuildSteps:
149+
- template: /eng/pipelines/libraries/helix.yml
150+
parameters:
151+
creator: dotnet-bot
152+
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)

eng/pipelines/runtime.yml

+41
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,47 @@ extends:
963963
eq(variables['monoContainsChange'], true),
964964
eq(variables['isRollingBuild'], true))
965965
966+
#
967+
# Android devices
968+
# Build the whole product using CoreCLR and run libraries tests
969+
#
970+
- template: /eng/pipelines/common/platform-matrix.yml
971+
parameters:
972+
jobTemplate: /eng/pipelines/common/global-build-job.yml
973+
helixQueuesTemplate: /eng/pipelines/libraries/helix-queues-setup.yml
974+
buildConfig: Release
975+
runtimeFlavor: coreclr
976+
platforms:
977+
- android_x64
978+
- android_arm64
979+
variables:
980+
# map dependencies variables to local variables
981+
- name: librariesContainsChange
982+
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'] ]
983+
- name: coreclrContainsChange
984+
value: $[ stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_coreclr.containsChange'] ]
985+
jobParameters:
986+
testGroup: innerloop
987+
nameSuffix: AllSubsets_CoreCLR
988+
buildArgs: -s clr.runtime+clr.alljits+clr.corelib+clr.nativecorelib+clr.tools+clr.packages+libs++libs.tests+host+packs -c $(_BuildConfig) /p:ArchiveTests=true /p:TestAssemblies=false
989+
timeoutInMinutes: 480
990+
condition: >-
991+
or(
992+
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_libraries.containsChange'], true),
993+
eq(stageDependencies.EvaluatePaths.evaluate_paths.outputs['SetPathVars_installer.containsChange'], true),
994+
eq(variables['isRollingBuild'], true))
995+
# extra steps, run tests
996+
postBuildSteps:
997+
- template: /eng/pipelines/libraries/helix.yml
998+
parameters:
999+
creator: dotnet-bot
1000+
testRunNamePrefixSuffix: CoreCLR_$(_BuildConfig)
1001+
condition: >-
1002+
or(
1003+
eq(variables['librariesContainsChange'], true),
1004+
eq(variables['coreclrContainsChange'], true),
1005+
eq(variables['isRollingBuild'], true))
1006+
9661007
#
9671008
# iOS/tvOS devices - Full AOT + AggressiveTrimming to reduce size
9681009
# Build the whole product using Mono and run libraries tests

src/libraries/tests.proj

+6-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@
723723
BuildInParallel="false" />
724724
</ItemGroup>
725725

726-
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'android'">
726+
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(RunSmokeTestsOnly)' != 'true' and '$(RunGrpcTestsOnly)' != 'true' and '$(TargetOS)' == 'android' and '$(RuntimeFlavor)' == 'Mono'">
727727
<ProjectReference Include="$(MonoProjectRoot)sample\Android\AndroidSampleApp.csproj"
728728
BuildInParallel="false" />
729729
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\Android\**\*.Test.csproj"
@@ -759,6 +759,11 @@
759759
AdditionalProperties="%(AdditionalProperties);_IsPublishing=true;Configuration=Release;PublishDir=$(XUnitLogCheckerLibrariesOutDir);ROOTFS_DIR=$(ROOTFS_DIR);RuntimeIdentifier=$(OutputRID)" />
760760
</ItemGroup>
761761

762+
<ItemGroup Condition="'$(ArchiveTests)' == 'true' and '$(TargetOS)' == 'android' and '$(RuntimeFlavor)' == 'CoreCLR'">
763+
<ProjectReference Include="$(RepoRoot)\src\tests\FunctionalTests\Android\Device_Emulator\JIT\Android.Device_Emulator.JIT.Test.csproj"
764+
BuildInParallel="false" />
765+
</ItemGroup>
766+
762767
<Target Name="GenerateMergedCoverageReport"
763768
AfterTargets="Test"
764769
DependsOnTargets="GenerateCoverageReport"

0 commit comments

Comments
 (0)