Skip to content

Commit f947bb3

Browse files
committed
Task 42210: Create separate flaky tests pipeline
- Added new flaky test pipeline and plumbed it through the MDS core pipeline.
1 parent a0357b2 commit f947bb3

5 files changed

Lines changed: 347 additions & 203 deletions

File tree

eng/pipelines/common/templates/jobs/ci-run-tests-job.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ parameters:
8989
type: boolean
9090
default: false
9191

92+
# If true, only flaky tests will be run. If false, all non-flaky tests will be run.
93+
- name: flakyTestsOnly
94+
type: boolean
95+
9296
jobs:
9397
- job: ${{ format('{0}', coalesce(parameters.jobDisplayName, parameters.image, 'unknown_image')) }}
9498

@@ -284,6 +288,7 @@ jobs:
284288
referenceType: ${{ parameters.referenceType }}
285289
testSet: ${{ parameters.testSet }}
286290
operatingSystem: ${{ parameters.operatingSystem }}
291+
flakyTestsOnly: ${{ parameters.flakyTestsOnly }}
287292

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

314320
- ${{ if eq(parameters.publishTestResults, true) }}:
315321
- template: /eng/pipelines/common/templates/steps/publish-test-results-step.yml@self

eng/pipelines/common/templates/stages/ci-run-tests-stage.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ parameters:
2424

2525
- name: mdsPackageVersion
2626
type: string
27-
27+
2828
- name: postTestJobs
2929
type: jobList
3030
default: []
@@ -46,6 +46,10 @@ parameters:
4646
- name: testJobTimeout
4747
type: number
4848

49+
# If true, only flaky tests will be run. If false, all non-flaky tests will be run.
50+
- name: flakyTestsOnly
51+
type: boolean
52+
4953
stages:
5054
- ${{ each config in parameters.testConfigurations }}:
5155
- ${{ each image in config.value.images }}:
@@ -79,6 +83,7 @@ stages:
7983
configSqlFor: ${{ config.value.configSqlFor }}
8084
operatingSystem: ${{ config.value.operatingSystem }}
8185
isArm64: ${{ eq(config.value.isArm64, 'true') }}
86+
flakyTestsOnly: ${{ parameters.flakyTestsOnly }}
8287
${{if ne(config.value.configProperties, '{}') }}:
8388
${{ each x86TF in config.value.configProperties.x86TestTargetFrameworks }}:
8489
${{ if eq(x86TF, targetFramework) }}:
@@ -103,7 +108,7 @@ stages:
103108
useManagedSNI: ${{ useManagedSNI }}
104109
mdsArtifactsName: ${{ parameters.mdsArtifactsName }}
105110
mdsPackageVersion: ${{ parameters.mdsPackageVersion }}
106-
prebuildSteps: ${{ parameters.prebuildSteps }}
111+
prebuildSteps: ${{ parameters.prebuildSteps }}
107112
targetFramework: ${{ targetFramework }}
108113
netcoreVersionTestUtils: ${{config.value.netcoreVersionTestUtils }}
109114
testSet: ${{ testSet }}
@@ -113,6 +118,7 @@ stages:
113118
configSqlFor: ${{ config.value.configSqlFor }}
114119
operatingSystem: ${{ config.value.operatingSystem }}
115120
isArm64: ${{ eq(config.value.isArm64, 'true') }}
121+
flakyTestsOnly: ${{ parameters.flakyTestsOnly }}
116122
${{if and(eq(usemanagedSNI, false), ne(config.value.configProperties, '{}')) }}:
117123
${{ each x86TF in config.value.configProperties.x86TestTargetFrameworks }}:
118124
${{ if eq(x86TF, targetFramework) }}:
@@ -122,7 +128,7 @@ stages:
122128
- ${{ if ne(length(parameters.postTestJobs), 0) }}:
123129
- stage: Post_Test
124130
displayName: 'Post Test Jobs'
125-
dependsOn:
131+
dependsOn:
126132
- ${{ each config in parameters.testConfigurations }}:
127133
- ${{ each image in config.value.images }}:
128134
- ${{ image.key }}

0 commit comments

Comments
 (0)