Skip to content

Commit

Permalink
[ci] Add some extra params to configure the test templates (#7955)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandel-macaque authored and pjcollins committed Apr 13, 2023
1 parent d4fdebe commit 74b924c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Runs MSBuild tests against a device running on macOS

parameters:
stageName: msbuilddevice_tests
job_name: 'mac_dotnetdevice_tests'
dependsOn: mac_build
agent_count: 8
stageCondition: succeeded()
stagePrefix: ''

stages:
- stage: msbuilddevice_tests
displayName: MSBuild Emulator Tests
dependsOn: mac_build
- stage: ${{ parameters.stageName }}
displayName: ${{ parameters.stagePrefix }}MSBuild Emulator Tests
dependsOn: ${{ parameters.dependsOn }}
condition: ${{ parameters.stageCondition }}
jobs:
- job: ${{ parameters.job_name }}
Expand Down Expand Up @@ -39,12 +42,12 @@ stages:
parameters:
displayName: install emulator
arguments: --s=EmulatorTestDependencies --android-sdk-platforms="$(androidSdkPlatforms)"

- task: DownloadPipelineArtifact@2
inputs:
artifactName: $(TestAssembliesArtifactName)
downloadPath: $(System.DefaultWorkingDirectory)/bin/Test$(XA.Build.Configuration)

- template: start-stop-emulator.yaml

- template: run-sliced-nunit-tests.yaml
Expand Down
11 changes: 7 additions & 4 deletions build-tools/automation/yaml-templates/stage-msbuild-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Runs MSBuild tests that do not require devices on Mac/Windows

parameters:
stageName: msbuild_dotnet
stageCondition: succeeded()
dependsOn: mac_build
stagePrefix: ''

stages:
- stage: msbuild_dotnet
displayName: MSBuild Tests
dependsOn: mac_build
- stage: ${{ parameters.stageName }}
displayName: ${{ parameters.stagePrefix }}MSBuild Tests
dependsOn: ${{ parameters.dependsOn }}
condition: ${{ parameters.stageCondition }}
jobs:
- template: run-msbuild-tests.yaml
Expand All @@ -16,7 +19,7 @@ stages:
jobDisplayName: macOS > Tests > MSBuild
agentCount: 10
testFilter: cat != Dummy # This is because $(ExcludedNUnitCategories) gets appended which starts with '&'

- template: run-msbuild-tests.yaml
parameters:
testOS: Windows
Expand Down

0 comments on commit 74b924c

Please # to comment.