@@ -15,6 +15,10 @@ parameters:
1515 type : string
1616 default : ' '
1717
18+ - name : internalSNIVersion
19+ type : string
20+ default : ' '
21+
1822 - name : buildType
1923 displayName : ' Build Type'
2024 default : Project
@@ -32,65 +36,69 @@ parameters:
3236
3337stages :
3438- ${{ each config in parameters.testConfigurations }} :
35- - ${{ each image in config.value.images }} :
36- - stage : ${{ image.key }}
37- ${{ if ne(parameters.dependsOn, '') }} :
38- dependsOn : ${{ parameters.dependsOn }}
39- ${{ else }} :
40- dependsOn : []
41- jobs :
42- - ${{ each targetFramework in config.value.TargetFrameworks }} :
43- - ${{ each platform in config.value.buildPlatforms }} :
44- - ${{ each testSet in config.value.TestSets }} :
45- - ${{ if contains(targetFramework, 'net4') }} : # .NET Framework
46- - template : ../jobs/ci-run-tests-job.yml@self
47- parameters :
48- debug : ${{ parameters.debug }}
49- buildType : ${{ parameters.buildType }}
50- poolName : ${{ config.value.pool }}
51- hostedPool : ${{ eq(config.value.hostedPool, true) }}
52- image : ${{ image.value }}
53- jobDisplayName : ${{ format('{0}_{1}_{2}', replace(targetFramework, '.', '_'), platform, testSet) }}
54- configProperties : ${{ config.value.configProperties }}
55- prebuildSteps : ${{ parameters.prebuildSteps }}
56- targetFramework : ${{ targetFramework }}
57- testSet : ${{ testSet }}
58- ${{ each codeCoveTF in config.value.codeCovTargetFrameworks }} :
59- ${{ if eq(codeCoveTF, targetFramework) }} :
60- publishTestResults : true
61- configSqlFor : ${{ config.value.configSqlFor }}
62- operatingSystem : ${{ config.value.operatingSystem }}
63- ${{if ne(config.value.configProperties, '{}') }} :
64- ${{ each x86TF in config.value.configProperties.x86TestTargetFrameworks }} :
65- ${{ if eq(x86TF, targetFramework) }} :
66- enableX86Test : true
67- - ${{ else }} : # .NET
68- - ${{ each useManagedSNI in config.value.useManagedSNI }} :
39+ # If internalSNIVersion is not set or if it is set and the test configuration requires custom SNI
40+ - ${{ if or(eq(parameters.internalSNIVersion, ''), and(ne(parameters.internalSNIVersion, ''), config.value.configProperties.runWithCustomSNI)) }} :
41+ - ${{ each image in config.value.images }} :
42+ - stage : ${{ image.key }}
43+ ${{ if ne(parameters.dependsOn, '') }} :
44+ dependsOn : ${{ parameters.dependsOn }}
45+ ${{ else }} :
46+ dependsOn : []
47+ jobs :
48+ - ${{ each targetFramework in config.value.TargetFrameworks }} :
49+ - ${{ each platform in config.value.buildPlatforms }} :
50+ - ${{ each testSet in config.value.TestSets }} :
51+ - ${{ if contains(targetFramework, 'net4') }} : # .NET Framework
6952 - template : ../jobs/ci-run-tests-job.yml@self
7053 parameters :
7154 debug : ${{ parameters.debug }}
7255 buildType : ${{ parameters.buildType }}
7356 poolName : ${{ config.value.pool }}
7457 hostedPool : ${{ eq(config.value.hostedPool, true) }}
7558 image : ${{ image.value }}
76- ${{if eq(usemanagedSNI, 'true') }} :
77- jobDisplayName : ${{ format('{0}_{1}_{2}_{3}', replace(targetFramework, '.', '_'), platform, 'ManagedSNI', testSet) }}
78- ${{ else }} :
79- jobDisplayName : ${{ format('{0}_{1}_{2}_{3}', replace(targetFramework, '.', '_'), platform, 'NativeSNI', testSet) }}
59+ jobDisplayName : ${{ format('{0}_{1}_{2}', replace(targetFramework, '.', '_'), platform, testSet) }}
8060 configProperties : ${{ config.value.configProperties }}
81- useManagedSNI : ${{ useManagedSNI }}
82- prebuildSteps : ${{ parameters.prebuildSteps }}
61+ prebuildSteps : ${{ parameters.prebuildSteps }}
8362 targetFramework : ${{ targetFramework }}
8463 testSet : ${{ testSet }}
8564 ${{ each codeCoveTF in config.value.codeCovTargetFrameworks }} :
8665 ${{ if eq(codeCoveTF, targetFramework) }} :
8766 publishTestResults : true
8867 configSqlFor : ${{ config.value.configSqlFor }}
8968 operatingSystem : ${{ config.value.operatingSystem }}
90- ${{if and(eq(usemanagedSNI, false), ne(config.value.configProperties, '{}') ) }} :
69+ ${{if ne(config.value.configProperties, '{}') }} :
9170 ${{ each x86TF in config.value.configProperties.x86TestTargetFrameworks }} :
9271 ${{ if eq(x86TF, targetFramework) }} :
9372 enableX86Test : true
73+ - ${{ else }} : # .NET
74+ - ${{ each useManagedSNI in config.value.useManagedSNI }} :
75+ # Skips ManagedSNI if the test configuration requires custom SNI
76+ - ${{ if or(eq(parameters.internalSNIVersion, ''), and(ne(parameters.internalSNIVersion, ''), ne(config.value.operatingSystem, 'Windows')), and(ne(parameters.internalSNIVersion, ''), config.value.configProperties.runWithCustomSNI, eq(usemanagedSNI, 'false'))) }} :
77+ - template : ../jobs/ci-run-tests-job.yml@self
78+ parameters :
79+ debug : ${{ parameters.debug }}
80+ buildType : ${{ parameters.buildType }}
81+ poolName : ${{ config.value.pool }}
82+ hostedPool : ${{ eq(config.value.hostedPool, true) }}
83+ image : ${{ image.value }}
84+ ${{if eq(usemanagedSNI, 'true') }} :
85+ jobDisplayName : ${{ format('{0}_{1}_{2}_{3}', replace(targetFramework, '.', '_'), platform, 'ManagedSNI', testSet) }}
86+ ${{ else }} :
87+ jobDisplayName : ${{ format('{0}_{1}_{2}_{3}', replace(targetFramework, '.', '_'), platform, 'NativeSNI', testSet) }}
88+ configProperties : ${{ config.value.configProperties }}
89+ useManagedSNI : ${{ useManagedSNI }}
90+ prebuildSteps : ${{ parameters.prebuildSteps }}
91+ targetFramework : ${{ targetFramework }}
92+ testSet : ${{ testSet }}
93+ ${{ each codeCoveTF in config.value.codeCovTargetFrameworks }} :
94+ ${{ if eq(codeCoveTF, targetFramework) }} :
95+ publishTestResults : true
96+ configSqlFor : ${{ config.value.configSqlFor }}
97+ operatingSystem : ${{ config.value.operatingSystem }}
98+ ${{if and(eq(usemanagedSNI, false), ne(config.value.configProperties, '{}')) }} :
99+ ${{ each x86TF in config.value.configProperties.x86TestTargetFrameworks }} :
100+ ${{ if eq(x86TF, targetFramework) }} :
101+ enableX86Test : true
94102
95103- ${{ if ne(length(parameters.postTestJobs), 0) }} :
96104 - stage : Post_Test
0 commit comments