diff --git a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml index 5a3d482c04f..1acd3e8fdce 100644 --- a/build-tools/automation/yaml-templates/run-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/run-msbuild-tests.yaml @@ -4,7 +4,10 @@ parameters: jobDisplayName: # Display name of the job agentCount: # Number of build agents to run in parallel testFilter: # Filter used to select tests (NUnit test selection language, not dotnet test filter language) - + xaSourcePath: $(System.DefaultWorkingDirectory) + repositoryAlias: 'self' + commit: '' + jobs: - job: ${{ parameters.jobName }} strategy: @@ -31,7 +34,10 @@ jobs: installLegacyDotNet: false restoreNUnitConsole: false updateMono: false - + xaSourcePath: ${{ parameters.xaSourcePath }} + repositoryAlias: ${{ parameters.repositoryAlias }} + commit: ${{ parameters.commit }} + - task: DownloadPipelineArtifact@2 inputs: artifactName: $(TestAssembliesArtifactName) diff --git a/build-tools/automation/yaml-templates/setup-test-environment.yaml b/build-tools/automation/yaml-templates/setup-test-environment.yaml index c07a00c5d5c..30db8d66110 100644 --- a/build-tools/automation/yaml-templates/setup-test-environment.yaml +++ b/build-tools/automation/yaml-templates/setup-test-environment.yaml @@ -10,13 +10,19 @@ parameters: restoreNUnitConsole: true updateMono: true androidSdkPlatforms: $(DefaultTestSdkPlatforms) + repositoryAlias: 'self' + commit: '' steps: -- checkout: self - clean: true - submodules: recursive - ${{ if ne(parameters.xaSourcePath, variables['System.DefaultWorkingDirectory']) }}: - path: s/xamarin-android + +- template: sdk-unified/steps/checkout/v1.yml@yaml-templates + parameters: + resource: ${{ parameters.repositoryAlias }} + commit: ${{ parameters.commit }} + clean: true + submodules: recursive + ${{ if ne(parameters.xaSourcePath, variables['System.DefaultWorkingDirectory']) }}: + path: s/xamarin-android - ${{ if eq(parameters.updateVS, true) }}: - template: update-vs.yaml 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 e5c3c33e857..a45bda8d962 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-emulator-tests.yaml @@ -7,6 +7,9 @@ parameters: agent_count: 8 stageCondition: succeeded() stagePrefix: '' + xaSourcePath: $(System.DefaultWorkingDirectory) + repositoryAlias: 'self' + commit: '' stages: - stage: ${{ parameters.stageName }} @@ -33,6 +36,9 @@ stages: restoreNUnitConsole: false updateMono: false androidSdkPlatforms: $(androidSdkPlatforms) + xaSourcePath: ${{ parameters.xaSourcePath }} + repositoryAlias: ${{ parameters.repositoryAlias }} + commit: ${{ parameters.commit }} - template: run-xaprepare.yaml parameters: @@ -87,6 +93,9 @@ stages: installLegacyDotNet: false restoreNUnitConsole: false androidSdkPlatforms: $(androidSdkPlatforms) + xaSourcePath: ${{ parameters.xaSourcePath }} + repositoryAlias: ${{ parameters.repositoryAlias }} + commit: ${{ parameters.commit }} - template: run-xaprepare.yaml parameters: diff --git a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml index 032984683f6..24f71d052f3 100644 --- a/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml +++ b/build-tools/automation/yaml-templates/stage-msbuild-tests.yaml @@ -5,6 +5,9 @@ parameters: stageCondition: succeeded() dependsOn: mac_build stagePrefix: '' + xaSourcePath: $(System.DefaultWorkingDirectory) + repositoryAlias: 'self' + commit: '' stages: - stage: ${{ parameters.stageName }} @@ -19,6 +22,9 @@ stages: jobDisplayName: macOS > Tests > MSBuild agentCount: 10 testFilter: cat != Dummy # This is because $(ExcludedNUnitCategories) gets appended which starts with '&' + xaSourcePath: ${{ parameters.xaSourcePath }} + repositoryAlias: ${{ parameters.repositoryAlias }} + commit: ${{ parameters.commit }} - template: run-msbuild-tests.yaml parameters: @@ -27,3 +33,6 @@ stages: jobDisplayName: Windows > Tests > MSBuild agentCount: 6 testFilter: cat != Dummy # This is because $(ExcludedNUnitCategories) gets appended which starts with '&' + xaSourcePath: ${{ parameters.xaSourcePath }} + repositoryAlias: ${{ parameters.repositoryAlias }} + commit: ${{ parameters.commit }}