From 74b924c14b3cbfea7b5fc87a41aaf40ec3c788fa Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Thu, 13 Apr 2023 13:08:22 -0400 Subject: [PATCH] [ci] Add some extra params to configure the test templates (#7955) --- .../stage-msbuild-emulator-tests.yaml | 13 ++++++++----- .../yaml-templates/stage-msbuild-tests.yaml | 11 +++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml index 7482109b42a..57c559ed59d 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -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 }} @@ -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 diff --git a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml index 09c1d8b5f2f..032984683f6 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml @@ -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 @@ -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