11 # If true, run the corefx tests instead of the coreclr ones
14 runInUnloadableContext: false
15 ignoreDependencyOnBuildJobs: false
19 ### Each test job depends on a corresponding build job with the same
20 ### buildConfig and archType.
23 - template: xplat-job.yml
25 buildConfig: ${{ parameters.buildConfig }}
26 archType: ${{ parameters.archType }}
27 osGroup: ${{ parameters.osGroup }}
28 osIdentifier: ${{ parameters.osIdentifier }}
29 helixType: 'build/tests/'
31 # Test jobs should continue on error for internal builds
32 ${{ if eq(variables['System.TeamProject'], 'internal') }}:
35 # Compute job name from template parameters
36 ${{ if and(eq(parameters.testGroup, 'innerloop'), eq(parameters.displayNameArgs, '')) }}:
37 name: ${{ format('test_{0}_{1}_{2}_{3}', 'p0', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
38 displayName: ${{ format('Test {0} {1} {2} {3}', 'Pri0', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
40 ${{ if and(ne(parameters.testGroup, 'innerloop'), eq(parameters.displayNameArgs, '')) }}:
41 name: ${{ format('test_{0}_{1}_{2}_{3}', 'p1', parameters.displayNameArgs, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
42 displayName: ${{ format('Test {0} {1} {2} {3}', 'Pri1', parameters.displayNameArgs, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
44 ${{ if and(eq(parameters.testGroup, 'innerloop'), ne(parameters.displayNameArgs, '')) }}:
45 name: ${{ format('test_{0}_{1}_{2}_{3}_{4}', 'p0', parameters.displayNameArgs, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
46 displayName: ${{ format('Test {0} {1} {2} {3} {4}', 'Pri0', parameters.displayNameArgs, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
48 ${{ if and(ne(parameters.testGroup, 'innerloop'), ne(parameters.displayNameArgs, '')) }}:
49 name: ${{ format('test_{0}_{1}_{2}_{3}_{4}', 'p1', parameters.displayNameArgs, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
50 displayName: ${{ format('Test {0} {1} {2} {3} {4}', 'Pri1', parameters.displayNameArgs, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
52 crossrootfsDir: ${{ parameters.crossrootfsDir }}
55 - ${{ if eq(variables['System.TeamProject'], 'internal') }}:
56 - group: DotNet-HelixApi-Access
58 # Map template parameters to command line arguments
61 - ${{ if ne(parameters.testGroup, 'innerloop') }}:
62 - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
65 - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
71 - ${{ if eq(parameters.readyToRun, true) }}:
77 # Our FreeBSD doesn't yet detect available clang versions, so pass it explicitly.
78 - ${{ if eq(parameters.osGroup, 'FreeBSD') }}:
81 - ${{ if eq(parameters.archType, 'arm64') }}:
87 - ${{ if eq(parameters.corefxTests, true) }}:
88 - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
90 value: 'generatetesthostonly'
91 - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
93 value: 'buildtesthostonly'
95 # FreeBSD test jobs are disabled since we don't have any FreeBSD helix queues.
96 ${{ if eq(parameters.osGroup, 'FreeBSD') }}:
99 # Test job depends on the corresponding build job
100 ${{ if ne(parameters.ignoreDependencyOnBuildJobs, true) }}:
101 dependsOn: ${{ format('build_{0}_{1}_{2}', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
103 # Run all steps in the container.
104 # Note that the containers are defined in platform-matrix.yml
105 container: ${{ parameters.container }}
107 # "Total" means building tests, waiting for a queue in Helix to become available, and running the tests.
108 # In case test-job.yml gets split into two separate jobs (e.g. build-test-job.yml and run-test.yml)
109 # this number should be adjusted accordingly.
110 ${{ if eq(parameters.testGroup, 'innerloop') }}:
111 timeoutInMinutes: 240
112 ${{ if in(parameters.testGroup, 'outerloop') }}:
113 timeoutInMinutes: 360
114 ${{ if in(parameters.testGroup, 'jitstress', 'jitstress-isas-arm', 'jitstressregs-x86', 'jitstressregs', 'jitstress2-jitstressregs', 'gcstress0x3-gcstress0xc') }}:
115 timeoutInMinutes: 480
116 ${{ if in(parameters.testGroup, 'jitstress-isas-x86', 'gcstress-extra', 'r2r-extra') }}:
117 timeoutInMinutes: 600
121 # Install test build dependencies
122 - ${{ if eq(parameters.osGroup, 'OSX') }}:
123 - script: sh eng/install-native-dependencies.sh $(osGroup)
124 displayName: Install native dependencies
127 # Download product binaries directory
128 - task: DownloadBuildArtifacts@0
129 displayName: Download product build
133 artifactName: ${{ format('BinDir_{0}_{1}_{2}', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
134 downloadPath: $(System.ArtifactsDirectory)
137 # Populate Product directory
139 displayName: Populate Product directory
141 sourceFolder: $(System.ArtifactsDirectory)/${{ format('BinDir_{0}_{1}_{2}', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }}
143 targetFolder: $(Build.SourcesDirectory)/bin/Product/$(osGroup).$(archType).$(buildConfigUpper)
147 - ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
148 - script: ./build-test.sh $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(crossgenArg) $(clangArg) $(testhostArg)
149 displayName: Build tests
150 - ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
151 - script: build-test.cmd $(buildConfig) $(archType) $(priorityArg) $(crossgenArg) $(testhostArg)
152 displayName: Build tests
155 # Send tests to Helix
156 - template: /eng/send-to-helix-step.yml
158 displayName: Send tests to Helix
159 buildConfig: $(buildConfigUpper)
160 archType: ${{ parameters.archType }}
161 osGroup: ${{ parameters.osGroup }}
163 ${{ if eq(variables['System.TeamProject'], 'public') }}:
164 creator: $(Build.DefinitionName)
166 helixBuild: $(Build.BuildNumber)
167 helixSource: $(_HelixSource)
169 # REVIEW: not sure why "cli" is part of the names here. Leave it for the ones that already had it,
170 # but don't add it to new ones.
171 ${{ if and(eq(parameters.corefxTests, true), eq(parameters.readyToRun, true)) }}:
172 helixType: 'test/functional/r2r_corefx/'
173 ${{ if and(eq(parameters.corefxTests, true), ne(parameters.readyToRun, true)) }}:
174 helixType: 'test/functional/corefx/'
175 ${{ if and(ne(parameters.corefxTests, true), eq(parameters.readyToRun, true)) }}:
176 helixType: 'test/functional/r2r/cli/'
177 ${{ if and(ne(parameters.corefxTests, true), ne(parameters.readyToRun, true)) }}:
178 helixType: 'test/functional/cli/'
180 helixQueues: ${{ parameters.helixQueues }}
182 # This tests whether an array is empty
183 ${{ if eq(join('', parameters.helixQueues), '') }}:
186 publishTestResults: true
190 # "timeoutPerTestCollectionInMinutes" is the time needed for the "biggest" xUnit test collection to complete.
191 # In case xUnit test wrappers get refactored this number should also be adjusted.
193 # "timeoutPerTestInMinutes" corresponds to individual test running time. This is implemented by setting
194 # the __TestTimeout variable, which is later read by the coreclr xunit test wrapper code (the code in the
195 # xunit test dlls that invokes the actual tests). Note this doesn't apply to CoreFX testing.
197 ${{ if and(eq(parameters.corefxTests, true), eq(parameters.testGroup, 'innerloop')) }}:
198 timeoutPerTestCollectionInMinutes: 120
199 ${{ if and(ne(parameters.corefxTests, true), eq(parameters.testGroup, 'innerloop')) }}:
200 timeoutPerTestCollectionInMinutes: 30
201 timeoutPerTestInMinutes: 10
202 ${{ if in(parameters.testGroup, 'outerloop') }}:
203 timeoutPerTestCollectionInMinutes: 120
204 timeoutPerTestInMinutes: 10
205 ${{ if in(parameters.testGroup, 'jitstress', 'jitstress-isas-arm', 'jitstress-isas-x86', 'jitstressregs-x86', 'jitstressregs', 'jitstress2-jitstressregs' ) }}:
206 timeoutPerTestCollectionInMinutes: 120
207 timeoutPerTestInMinutes: 30
208 ${{ if in(parameters.testGroup, 'gcstress0x3-gcstress0xc') }}:
209 timeoutPerTestCollectionInMinutes: 240
210 timeoutPerTestInMinutes: 60
211 ${{ if in(parameters.testGroup, 'gcstress-extra', 'r2r-extra') }}:
212 timeoutPerTestCollectionInMinutes: 300
213 timeoutPerTestInMinutes: 90
215 runCrossGen: ${{ parameters.readyToRun }}
216 runInUnloadableContext: ${{ parameters.runInUnloadableContext }}
218 ${{ if eq(variables['System.TeamProject'], 'internal') }}:
219 # Access token variable for internal project from the
220 # DotNet-HelixApi-Access variable group
221 helixAccessToken: $(HelixApiAccessToken)
223 # Choose which tests to send to Helix: CoreFX or CoreCLR.
224 ${{ if eq(parameters.corefxTests, true) }}:
225 helixProjectArguments: 'eng/helixcorefxtests.proj'
226 ${{ if ne(parameters.corefxTests, true) }}:
227 helixProjectArguments: 'tests/helixpublishwitharcade.proj'
229 ${{ if in(parameters.testGroup, 'innerloop', 'outerloop') }}:
232 - no_tiered_compilation
233 ${{ if in(parameters.testGroup, 'jitstress') }}:
242 ${{ if in(parameters.testGroup, 'jitstress-isas-arm') }}:
244 - jitstress_isas_incompletehwintrinsic
245 - jitstress_isas_nohwintrinsic
246 - jitstress_isas_nohwintrinsic_nosimd
247 - jitstress_isas_nosimd
248 ${{ if in(parameters.testGroup, 'jitstress-isas-x86') }}:
250 - jitstress_isas_incompletehwintrinsic
251 - jitstress_isas_nohwintrinsic
252 - jitstress_isas_nohwintrinsic_nosimd
253 - jitstress_isas_nosimd
254 - jitstress_isas_x86_noaes
255 - jitstress_isas_x86_noavx
256 - jitstress_isas_x86_noavx2
257 - jitstress_isas_x86_nobmi1
258 - jitstress_isas_x86_nobmi2
259 - jitstress_isas_x86_nofma
260 - jitstress_isas_x86_nohwintrinsic
261 - jitstress_isas_x86_nolzcnt
262 - jitstress_isas_x86_nopclmulqdq
263 - jitstress_isas_x86_nopopcnt
264 - jitstress_isas_x86_nosse
265 - jitstress_isas_x86_nosse2
266 - jitstress_isas_x86_nosse3
267 - jitstress_isas_x86_nosse3_4
268 - jitstress_isas_x86_nosse41
269 - jitstress_isas_x86_nosse42
270 - jitstress_isas_x86_nossse3
271 ${{ if in(parameters.testGroup, 'jitstressregs-x86') }}:
273 - jitstressregs1_x86_noavx
274 - jitstressregs2_x86_noavx
275 - jitstressregs3_x86_noavx
276 - jitstressregs4_x86_noavx
277 - jitstressregs8_x86_noavx
278 - jitstressregs0x10_x86_noavx
279 - jitstressregs0x80_x86_noavx
280 - jitstressregs0x1000_x86_noavx
281 ${{ if in(parameters.testGroup, 'jitstressregs' ) }}:
290 - jitstressregs0x1000
291 ${{ if in(parameters.testGroup, 'jitstress2-jitstressregs') }}:
293 - jitstress2_jitstressregs1
294 - jitstress2_jitstressregs2
295 - jitstress2_jitstressregs3
296 - jitstress2_jitstressregs4
297 - jitstress2_jitstressregs8
298 - jitstress2_jitstressregs0x10
299 - jitstress2_jitstressregs0x80
300 - jitstress2_jitstressregs0x1000
301 ${{ if in(parameters.testGroup, 'gcstress0x3-gcstress0xc') }}:
305 ${{ if in(parameters.testGroup, 'gcstress-extra') }}:
308 - gcstress0xc_zapdisable
309 - gcstress0xc_zapdisable_jitstress2
310 - gcstress0xc_zapdisable_heapverify1
311 - gcstress0xc_jitstress1
312 - gcstress0xc_jitstress2
313 - gcstress0xc_jitminopts_heapverify1
314 ${{ if in(parameters.testGroup, 'r2r-extra') }}:
327 - jitstressregs0x1000
333 - task: PublishBuildArtifacts@1
334 displayName: Publish Logs
336 pathtoPublish: $(Build.SourcesDirectory)/bin/Logs
337 ${{ if and(eq(parameters.corefxTests, true), eq(parameters.readyToRun, true)) }}:
338 artifactName: ${{ format('TestLogs_r2r_corefx_{0}_{1}_{2}_{3}', parameters.osIdentifier, parameters.archType, parameters.buildConfig, parameters.testGroup) }}
339 ${{ if and(eq(parameters.corefxTests, true), ne(parameters.readyToRun, true)) }}:
340 artifactName: ${{ format('TestLogs_corefx_{0}_{1}_{2}_{3}', parameters.osIdentifier, parameters.archType, parameters.buildConfig, parameters.testGroup) }}
341 ${{ if and(ne(parameters.corefxTests, true), eq(parameters.readyToRun, true)) }}:
342 artifactName: ${{ format('TestLogs_r2r_{0}_{1}_{2}_{3}', parameters.osIdentifier, parameters.archType, parameters.buildConfig, parameters.testGroup) }}
343 ${{ if and(ne(parameters.corefxTests, true), ne(parameters.readyToRun, true)) }}:
344 artifactName: ${{ format('TestLogs_{0}_{1}_{2}_{3}', parameters.osIdentifier, parameters.archType, parameters.buildConfig, parameters.testGroup) }}
345 continueOnError: true