Skip to content

Commit 645f39a

Browse files
[coreclr] run Mono.Android-Tests
This is WIP.
1 parent 599bd6c commit 645f39a

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

build-tools/automation/yaml-templates/stage-package-tests.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,16 @@ stages:
198198
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
199199
artifactFolder: $(DotNetTargetFramework)-AotLlvm
200200

201+
- template: /build-tools/automation/yaml-templates/apk-instrumentation.yaml
202+
parameters:
203+
configuration: $(XA.Build.Configuration)
204+
testName: Mono.Android.NET_Tests-CoreCLR
205+
project: tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj
206+
testResultsFiles: TestResult-Mono.Android.NET_Tests-$(XA.Build.Configuration)CoreCLR.xml
207+
extraBuildArgs: -p:TestsFlavor=CoreCLR -p:UseMonoRuntime=false -p:AndroidEnableMarshalMethods=false
208+
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Mono.Android.NET_Tests-Signed.aab
209+
artifactFolder: $(DotNetTargetFramework)-CoreCLR
210+
201211
- template: /build-tools/automation/yaml-templates/apk-instrumentation.yaml
202212
parameters:
203213
configuration: $(XA.Build.Configuration)
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!-- Needed for projects using CoreCLR/NativeAOT runtime packs that are not in the workload -->
2+
<Project>
3+
<PropertyGroup Condition=" '$(RunningOnCI)' == 'true' ">
4+
<_NuGetFolderOnCI>$(MSBuildThisFileDirectory)..\..\bin\Build$(Configuration)\nuget-unsigned</_NuGetFolderOnCI>
5+
<RestoreAdditionalProjectSources Condition="Exists('$(_NuGetFolderOnCI)')">$(_NuGetFolderOnCI)</RestoreAdditionalProjectSources>
6+
<_FastDeploymentDiagnosticLogging>true</_FastDeploymentDiagnosticLogging>
7+
</PropertyGroup>
8+
</Project>

build-tools/scripts/TestApks.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<PropertyGroup>
2020
<!-- APK tests might run on 32-bit emulators -->
21-
<RuntimeIdentifiers Condition=" '$(RuntimeIdentifier)' == '' ">android-arm64;android-x86;android-x64;</RuntimeIdentifiers>
21+
<RuntimeIdentifiers Condition=" '$(RuntimeIdentifier)' == '' and '$(PublishAot)' != 'true' and '$(UseMonoRuntime)' != 'false' ">android-arm64;android-x86;android-x64;</RuntimeIdentifiers>
2222
<TestAvdApiLevel Condition=" '$(TestAvdApiLevel)' == '' ">29</TestAvdApiLevel>
2323
<TestAvdAbi Condition=" '$(TestAvdAbi)' == '' and '$(HostOS)' == 'Darwin' and '$(HostOSArchitecture)' == 'Arm64' ">arm64-v8a</TestAvdAbi>
2424
<TestAvdAbi Condition=" '$(TestAvdAbi)' == '' ">x86_64</TestAvdAbi>

samples/NativeAOT/NativeAOT.csproj

+1-6
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
<PublishAot>true</PublishAot>
1414
</PropertyGroup>
1515

16-
<!-- Settings for CI -->
17-
<PropertyGroup Condition=" '$(RunningOnCI)' == 'true' ">
18-
<_NuGetFolderOnCI>..\..\bin\Build$(Configuration)\nuget-unsigned</_NuGetFolderOnCI>
19-
<RestoreAdditionalProjectSources Condition="Exists('$(_NuGetFolderOnCI)')">$(_NuGetFolderOnCI)</RestoreAdditionalProjectSources>
20-
<_FastDeploymentDiagnosticLogging>true</_FastDeploymentDiagnosticLogging>
21-
</PropertyGroup>
16+
<Import Project="..\..\build-tools\scripts\TestApkFeeds.props" />
2217

2318
</Project>

tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk" >
22

33
<Import Project="..\..\..\Configuration.props" />
4+
<Import Project="..\..\..\build-tools\scripts\TestApkFeeds.props" />
45

56
<PropertyGroup>
67
<TargetFramework>$(DotNetAndroidTargetFramework)</TargetFramework>

0 commit comments

Comments
 (0)