File tree Expand file tree Collapse file tree 2 files changed +26
-12
lines changed
build-tools/automation/yaml-templates Expand file tree Collapse file tree 2 files changed +26
-12
lines changed Original file line number Diff line number Diff line change @@ -52,12 +52,7 @@ stages:
5252 --outfile="$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/MSBuildDeviceIntegration/${{ parameters.target_framework }}/MSBuildDeviceIntegration.runsettings"
5353 displayName: Slice unit tests
5454
55- - task : MSBuild@1
56- displayName : start emulator
57- inputs :
58- solution : tests/Mono.Android-Tests/Mono.Android-Tests.csproj
59- configuration : $(XA.Build.Configuration)
60- msbuildArguments : /t:AcquireAndroidTarget /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/start-emulator.binlog
55+ - template : start-emulator.yaml
6156
6257 - template : run-nunit-tests.yaml
6358 parameters :
@@ -121,12 +116,13 @@ stages:
121116 artifactName : $(TestAssembliesArtifactName)
122117 downloadPath : $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)
123118
124- - task : MSBuild@1
125- displayName : install and launch emulator
126- inputs :
127- solution : tests/Mono.Android-Tests/Mono.Android-Tests.csproj
128- configuration : $(XA.Build.Configuration)
129- msbuildArguments : /t:InstallAvdImage;AcquireAndroidTarget /p:TestDeviceName=$(deviceName) /p:TestAvdApiLevel=$(avdApiLevel) /p:TestAvdAbi=$(avdAbi) /p:TestAvdType=$(avdType) /bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/install-emulator-$(avdApiLevel).binlog
119+ - template : start-emulator.yaml
120+ parameters :
121+ installImage : true
122+ installDeviceName : $(deviceName)
123+ installAvdApiLevel : $(avdApiLevel)
124+ installAvdAbi : $(avdAbi)
125+ installAvdType : $(avdType)
130126
131127 - template : run-nunit-tests.yaml
132128 parameters :
Original file line number Diff line number Diff line change 1+ parameters :
2+ installImage : false # 'true' to create a new specific AVD image emulator, if 'true', other 'install*' parameters must be provided
3+ installDeviceName : # Device name to install, like 'wear_square'
4+ installAvdApiLevel : # Device API level to install, like '30'
5+ installAvdAbi : # Device ABI to install, like 'x86'
6+ installAvdType : # Device AVD to install, like 'android-wear'
7+
8+ steps :
9+ # This uses our in-tree 'dotnet' because the system one may not have the 'android' workload installed.
10+ - template : run-dotnet-preview.yaml
11+ parameters :
12+ displayName : Start emulator
13+ continueOnError : false
14+ project : tests/Mono.Android-Tests/Runtime-Microsoft.Android.Sdk/Mono.Android.NET-Tests.csproj
15+ ${{ if eq(parameters.installImage, true) }} :
16+ arguments : -c $(XA.Build.Configuration) -t:InstallAvdImage;AcquireAndroidTarget -p:TestDeviceName=${{ parameters.installDeviceName }} -p:TestAvdApiLevel=${{ parameters.installAvdApiLevel }} -p:TestAvdAbi=${{ parameters.installAvdAbi }} -p:TestAvdType=${{ parameters.installAvdType }} -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/install-emulator-${{ parameters.installAvdApiLevel }}.binlog
17+ ${{ else }} :
18+ arguments : -c $(XA.Build.Configuration) -t:AcquireAndroidTarget -bl:$(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)/start-emulator.binlog
You can’t perform that action at this time.
0 commit comments