parameters: buildConfig: '' archType: '' osGroup: '' osIdentifier: '' priority: 0 crossgen: false scenarios: '' helixQueuesPublic: '' helixQueuesInternal: '' timeoutInMinutes: '' crossrootfsDir: '' ### Test job ### Each test job depends on a corresponding build job with the same ### buildConfig and archType. jobs: - template: xplat-job.yml parameters: buildConfig: ${{ parameters.buildConfig }} archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} osIdentifier: ${{ parameters.osIdentifier }} # Compute job name from template parameters ${{ if eq(parameters.crossgen, 'false') }}: name: ${{ format('testbuild_pri{0}_{1}_{2}_{3}', parameters.priority, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} displayName: ${{ format('Test Pri{0} {1} {2} {3}', parameters.priority, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} ${{ if eq(parameters.crossgen, 'true') }}: name: ${{ format('testbuild_pri{0}_r2r_{1}_{2}_{3}', parameters.priority, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} displayName: ${{ format('Test Pri{0} R2R {1} {2} {3}', parameters.priority, parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} crossrootfsDir: ${{ parameters.crossrootfsDir }} ${{ if eq(parameters.crossgen, 'false') }}: helixType: ${{ format('test/functional/cli/pri{0}', parameters.priority) }} ${{ if eq(parameters.crossgen, 'true') }}: helixType: ${{ format('test/functional/r2r/cli/pri{0}', parameters.priority) }} variables: - group: DotNet-HelixApi-Access # Map template parameters to command line arguments - ${{ if eq(parameters.priority, '1') }}: - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - name: priorityArg value: 'priority1' - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - name: priorityArg value: '-priority=1' - ${{ if eq(parameters.priority, '0') }}: - name: priorityArg value: '' - ${{ if eq(parameters.crossgen, 'true') }}: - name: crossgenArg value: 'crossgen' - ${{ if eq(parameters.crossgen, 'false') }}: - name: crossgenArg value: '' # TODO: Enable crossgen in build-test.sh. It currently doesn't # accept a crossgen arg, so disable the macos/linux crossgen test # build jobs. ${{ if and(eq(parameters.crossgen, 'true'), in(parameters.osGroup, 'Linux', 'OSX')) }}: condition: false # FreeBSD test jobs are disabled since we don't have any FreeBSD helix queues. ${{ if eq(parameters.osGroup, 'FreeBSD') }}: condition: false # Test job depends on the corresponding build job dependsOn: ${{ format('build_{0}_{1}_{2}', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} # Run all steps in the container. # Note that the containers are resources defined in azure-pipelines.yml containerName: ${{ parameters.containerName }} timeoutInMinutes: ${{ parameters.timeoutInMinutes }} steps: # Install test build dependencies - ${{ if eq(parameters.osGroup, 'OSX') }}: - script: sh eng/install-native-dependencies.sh $(osGroup) displayName: Install native dependencies # Download product build from pipeline artifact storage - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - task: DownloadPipelineArtifact@0 displayName: Download product build pipeline artifact inputs: artifactName: ${{ format('{0}_{1}_{2}_build', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} targetPath: $(Build.SourcesDirectory)/bin/Product/$(osGroup).$(archType).$(buildConfigUpper) - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - task: DownloadPipelineArtifact@0 displayName: Download product build pipeline artifact inputs: artifactName: ${{ format('{0}_{1}_{2}_build', parameters.osIdentifier, parameters.archType, parameters.buildConfig) }} targetPath: $(Build.SourcesDirectory)\bin\Product\Windows_NT.$(archType).$(buildConfigUpper) # Build tests # TODO: enable crossgen in build-test.sh - ${{ if ne(parameters.osGroup, 'Windows_NT') }}: - script: ./build-test.sh $(buildConfig) $(archType) $(crossArg) $(priorityArg) $(crossgenArg) displayName: Build tests - ${{ if eq(parameters.osGroup, 'Windows_NT') }}: - script: build-test.cmd $(buildConfig) $(archType) $(priorityArg) $(crossgenArg) displayName: Build tests # Send tests to Helix - template: /eng/send-to-helix-step.yml parameters: displayName: Send tests to Helix buildConfig: ${{ parameters.buildConfig }} archType: ${{ parameters.archType }} osGroup: ${{ parameters.osGroup }} helixBuild: $(Build.BuildNumber) helixSource: $(_HelixSource) helixType: $(_HelixType) publishTestResults: true # TODO: see if this amount is enough for all individual jobs to finish # TODO: consider passing this value as a parameter to a test job timeoutInMinutes: 30 ${{ if eq(variables['System.TeamProject'], 'internal') }}: # Access token variable for internal project from the # DotNet-HelixApi-Access variable group helixAccessToken: $(HelixApiAccessToken) helixQueues: ${{ parameters.helixQueuesInternal }} ${{ if eq(parameters.helixQueuesInternal, '') }}: condition: false ${{ if eq(variables['System.TeamProject'], 'public') }}: creator: coreclr-pulls helixQueues: ${{ parameters.helixQueuesPublic }} ${{ if eq(parameters.helixQueuesPublic, '') }}: condition: false scenarios: ${{ parameters.scenarios }}