Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions eng/pipelines/common/templates/jobs/ci-run-tests-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ parameters:
type: boolean
default: false

# If true, only flaky tests will be run. If false, all non-flaky tests will be run.
- name: flakyTestsOnly
type: boolean

jobs:
- job: ${{ format('{0}', coalesce(parameters.jobDisplayName, parameters.image, 'unknown_image')) }}

Expand Down Expand Up @@ -284,6 +288,7 @@ jobs:
referenceType: ${{ parameters.referenceType }}
testSet: ${{ parameters.testSet }}
operatingSystem: ${{ parameters.operatingSystem }}
flakyTestsOnly: ${{ parameters.flakyTestsOnly }}

- ${{ if and(eq(parameters.enableX86Test, true), eq(parameters.operatingSystem, 'Windows')) }}:
# Set up for x86 tests by manually installing dotnet for x86 to an alternative location. This
Expand All @@ -310,6 +315,7 @@ jobs:
msbuildArchitecture: x86
dotnetx86RootPath: $(dotnetx86RootPath)
operatingSystem: ${{ parameters.operatingSystem }}
flakyTestsOnly: ${{ parameters.flakyTestsOnly }}

- ${{ if eq(parameters.publishTestResults, true) }}:
- template: /eng/pipelines/common/templates/steps/publish-test-results-step.yml@self
Expand Down
12 changes: 9 additions & 3 deletions eng/pipelines/common/templates/stages/ci-run-tests-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ parameters:

- name: mdsPackageVersion
type: string

- name: postTestJobs
type: jobList
default: []
Expand All @@ -46,6 +46,10 @@ parameters:
- name: testJobTimeout
type: number

# If true, only flaky tests will be run. If false, all non-flaky tests will be run.
- name: flakyTestsOnly
type: boolean

stages:
- ${{ each config in parameters.testConfigurations }}:
- ${{ each image in config.value.images }}:
Expand Down Expand Up @@ -79,6 +83,7 @@ stages:
configSqlFor: ${{ config.value.configSqlFor }}
operatingSystem: ${{ config.value.operatingSystem }}
isArm64: ${{ eq(config.value.isArm64, 'true') }}
flakyTestsOnly: ${{ parameters.flakyTestsOnly }}
${{if ne(config.value.configProperties, '{}') }}:
${{ each x86TF in config.value.configProperties.x86TestTargetFrameworks }}:
${{ if eq(x86TF, targetFramework) }}:
Expand All @@ -103,7 +108,7 @@ stages:
useManagedSNI: ${{ useManagedSNI }}
mdsArtifactsName: ${{ parameters.mdsArtifactsName }}
mdsPackageVersion: ${{ parameters.mdsPackageVersion }}
prebuildSteps: ${{ parameters.prebuildSteps }}
prebuildSteps: ${{ parameters.prebuildSteps }}
targetFramework: ${{ targetFramework }}
netcoreVersionTestUtils: ${{config.value.netcoreVersionTestUtils }}
testSet: ${{ testSet }}
Expand All @@ -113,6 +118,7 @@ stages:
configSqlFor: ${{ config.value.configSqlFor }}
operatingSystem: ${{ config.value.operatingSystem }}
isArm64: ${{ eq(config.value.isArm64, 'true') }}
flakyTestsOnly: ${{ parameters.flakyTestsOnly }}
${{if and(eq(usemanagedSNI, false), ne(config.value.configProperties, '{}')) }}:
${{ each x86TF in config.value.configProperties.x86TestTargetFrameworks }}:
${{ if eq(x86TF, targetFramework) }}:
Expand All @@ -122,7 +128,7 @@ stages:
- ${{ if ne(length(parameters.postTestJobs), 0) }}:
- stage: Post_Test
displayName: 'Post Test Jobs'
dependsOn:
dependsOn:
- ${{ each config in parameters.testConfigurations }}:
- ${{ each image in config.value.images }}:
- ${{ image.key }}
Expand Down
Loading
Loading