diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2c00b4965a..9f250bccf2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -312,7 +312,7 @@ stages: imageName: 'macOS-10.14' maximumParallelJobs: 7 maximumAllowedFailures: 4 # Maximum allowed failures for a successful build - displayName: 'Test netcoreapp3.1 on' + displayName: 'Test netcoreapp3.1,x64 on' pool: vmImage: $(imageName) steps: @@ -320,6 +320,7 @@ stages: parameters: osName: $(osName) framework: 'netcoreapp3.1' + vsTestPlatform: 'x64' testResultsArtifactName: '$(TestResultsArtifactName)' maximumParallelJobs: $(maximumParallelJobs) maximumAllowedFailures: $(maximumAllowedFailures) @@ -343,7 +344,7 @@ stages: imageName: 'macOS-10.14' maximumParallelJobs: 7 maximumAllowedFailures: 4 # Maximum allowed failures for a successful build - displayName: 'Test netcoreapp2.1 on' + displayName: 'Test netcoreapp2.1,x64 on' pool: vmImage: $(imageName) steps: @@ -351,13 +352,14 @@ stages: parameters: osName: $(osName) framework: 'netcoreapp2.1' + vsTestPlatform: 'x64' testResultsArtifactName: '$(TestResultsArtifactName)' maximumParallelJobs: $(maximumParallelJobs) maximumAllowedFailures: $(maximumAllowedFailures) - - job: Test_net48_Windows + - job: Test_net48_Windows_x64 condition: and(succeeded(), ne(variables['RunTests'], 'false')) - displayName: 'Test net48 on Windows' + displayName: 'Test net48,x64 on Windows' pool: vmImage: 'windows-2019' steps: @@ -365,9 +367,26 @@ stages: parameters: osName: 'Windows' framework: 'net48' + vsTestPlatform: 'x64' testResultsArtifactName: '$(TestResultsArtifactName)' maximumParallelJobs: 8 - maximumAllowedFailures: 4 # Maximum allowed failures for a successful build + maximumAllowedFailures: 2 # Maximum allowed failures for a successful build + + - job: Test_net48_Windows_x86 + condition: and(succeeded(), ne(variables['RunTests'], 'false')) + displayName: 'Test net48,x86 on Windows' + pool: + vmImage: 'windows-2019' + steps: + - template: 'build/azure-templates/run-tests-on-os.yml' + parameters: + osName: 'Windows' + framework: 'net48' + vsTestPlatform: 'x86' + testResultsArtifactName: '$(TestResultsArtifactName)' + maximumParallelJobs: 8 + maximumAllowedFailures: 5 # Maximum allowed failures for a successful build + - stage: Publish_Stage displayName: 'Publish Stage:' diff --git a/build/azure-templates/publish-test-results-for-test-projects.yml b/build/azure-templates/publish-test-results-for-test-projects.yml index 038ec93c36..d693e904d1 100644 --- a/build/azure-templates/publish-test-results-for-test-projects.yml +++ b/build/azure-templates/publish-test-results-for-test-projects.yml @@ -34,6 +34,7 @@ # " testProjectName: '$projectName'`n" + ` # " osName: '$`{`{ parameters.osName `}`}'`n" + ` # " framework: '$`{`{ parameters.framework `}`}'`n" + ` +# " vsTestPlatform: '$`{`{ parameters.vsTestPlatform `}`}'`n" + ` # " testResultsFormat: '$`{`{ parameters.testResultsFormat `}`}'`n" + ` # " testResultsArtifactName: '$`{`{ parameters.testResultsArtifactName `}`}'`n" + ` # " testResultsFileName: '$`{`{ parameters.testResultsFileName `}`}'`n" + ` @@ -47,6 +48,7 @@ parameters: osName: '' # The name of the operating system for display purposes. framework: '' # The target framework to publish. + vsTestPlatform: 'x64' # Target platform architecture used for test execution. Valid values are x86, x64, and ARM. testResultsFormat: VSTest # Specify the format of the results files you want to publish. The following formats are supported: JUnit, NUnit, VSTest, XUnit, CTest testResultsArtifactName: 'testresults' # The name of the Azure DevOps build artifact where the test results will be published. Default 'testresults'. testResultsFileName: 'TestResults.trx' # The name of the file (not path) of the test results. Default 'TestResults.trx'. @@ -60,6 +62,8 @@ steps: # } # } # EnsureNotNullOrEmpty('${{ parameters.osName }}', 'osName') +# EnsureNotNullOrEmpty('${{ parameters.framework }}', 'framework') +# EnsureNotNullOrEmpty('${{ parameters.vsTestPlatform }}', 'vsTestPlatform') # EnsureNotNullOrEmpty('${{ parameters.testResultsFormat }}', 'testResultsFormat') # EnsureNotNullOrEmpty('${{ parameters.testResultsArtifactName }}', 'testResultsArtifactName') # EnsureNotNullOrEmpty('${{ parameters.testResultsFileName }}', 'testResultsFileName') @@ -69,8 +73,9 @@ steps: # Special case: Only supports .NET Standard 2.0 - template: publish-test-results.yml parameters: - framework: 'netcoreapp2.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml testProjectName: 'Lucene.Net.Tests.CodeAnalysis' + framework: 'netcoreapp2.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml + vsTestPlatform: '${{ parameters.vsTestPlatform }}' osName: '${{ parameters.osName }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' @@ -79,8 +84,9 @@ steps: # Special case: Only supports .netcoreapp3.1 - template: publish-test-results.yml parameters: - framework: 'netcoreapp3.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml testProjectName: 'Lucene.Net.Tests.Cli' + framework: 'netcoreapp3.1' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml + vsTestPlatform: '${{ parameters.vsTestPlatform }}' osName: '${{ parameters.osName }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' @@ -89,8 +95,9 @@ steps: # Special case: Only supports .net48 - template: publish-test-results.yml parameters: - framework: 'net48' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml testProjectName: 'Lucene.Net.Tests.Analysis.OpenNLP' + framework: 'net48' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml + vsTestPlatform: '${{ parameters.vsTestPlatform }}' osName: '${{ parameters.osName }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' @@ -102,6 +109,7 @@ steps: testProjectName: 'Lucene.Net.Tests.ICU' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -111,6 +119,7 @@ steps: testProjectName: 'Lucene.Net.Tests._A-D' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -120,6 +129,7 @@ steps: testProjectName: 'Lucene.Net.Tests._E-I' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -129,6 +139,7 @@ steps: testProjectName: 'Lucene.Net.Tests._I-J' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -138,6 +149,7 @@ steps: testProjectName: 'Lucene.Net.Tests._J-S' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -147,6 +159,7 @@ steps: testProjectName: 'Lucene.Net.Tests._T-Z' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -156,6 +169,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Analysis.Common' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -165,6 +179,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Analysis.Kuromoji' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -174,6 +189,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Analysis.Morfologik' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -183,6 +199,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Analysis.Phonetic' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -192,6 +209,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Analysis.SmartCn' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -201,6 +219,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Analysis.Stempel' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -210,6 +229,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Benchmark' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -219,6 +239,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Classification' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -228,6 +249,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Codecs' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -237,6 +259,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Demo' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -246,6 +269,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Expressions' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -255,6 +279,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Facet' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -264,6 +289,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Grouping' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -273,6 +299,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Highlighter' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -282,6 +309,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Join' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -291,6 +319,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Memory' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -300,6 +329,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Misc' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -309,6 +339,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Queries' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -318,6 +349,7 @@ steps: testProjectName: 'Lucene.Net.Tests.QueryParser' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -327,6 +359,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Replicator' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -336,6 +369,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Sandbox' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -345,6 +379,7 @@ steps: testProjectName: 'Lucene.Net.Tests.Spatial' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' @@ -354,24 +389,27 @@ steps: testProjectName: 'Lucene.Net.Tests.Suggest' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' - template: publish-test-results.yml parameters: - testProjectName: 'Lucene.Net.Tests.TestFramework' + testProjectName: 'Lucene.Net.Tests.TestFramework.DependencyInjection' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' testResultsFileName: '${{ parameters.testResultsFileName }}' - template: publish-test-results.yml parameters: - testProjectName: 'Lucene.Net.Tests.TestFramework.DependencyInjection' + testProjectName: 'Lucene.Net.Tests.TestFramework' osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' testResultsFormat: '${{ parameters.testResultsFormat }}' testResultsArtifactName: '${{ parameters.testResultsArtifactName }}' - testResultsFileName: '${{ parameters.testResultsFileName }}' \ No newline at end of file + testResultsFileName: '${{ parameters.testResultsFileName }}' diff --git a/build/azure-templates/publish-test-results.yml b/build/azure-templates/publish-test-results.yml index 9de28db77c..a6aa312ad8 100644 --- a/build/azure-templates/publish-test-results.yml +++ b/build/azure-templates/publish-test-results.yml @@ -20,6 +20,7 @@ parameters: testProjectName: '' # The name of the test project framework: '' # The target framework for display purposes. + vsTestPlatform: 'x64' # Target platform architecture used for test execution. Valid values are x86, x64, and ARM. osName: '' # The name of the operating system for display purposes. testResultsFormat: VSTest # Specify the format of the results files you want to publish. The following formats are supported: JUnit, NUnit, VSTest, XUnit, CTest testResultsArtifactName: 'testresults' # The name of the Azure DevOps build artifact where the test results will be published. Default 'testresults'. @@ -35,6 +36,7 @@ steps: # } # EnsureNotNullOrEmpty('${{ parameters.testProjectName }}', 'testProjectName') # EnsureNotNullOrEmpty('${{ parameters.framework }}', 'framework') +# EnsureNotNullOrEmpty('${{ parameters.vsTestPlatform }}', 'vsTestPlatform') # EnsureNotNullOrEmpty('${{ parameters.osName }}', 'osName') # EnsureNotNullOrEmpty('${{ parameters.testResultsFormat }}', 'testResultsFormat') # EnsureNotNullOrEmpty('${{ parameters.testResultsArtifactName }}', 'testResultsArtifactName') @@ -44,7 +46,7 @@ steps: - template: 'show-all-files.yml' # Uncomment for debugging - powershell: | - $testResultsFileName = "$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}/${{ parameters.osName }}/${{ parameters.framework }}/${{ parameters.testProjectName }}/${{ parameters.testResultsFileName }}" + $testResultsFileName = "$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}/${{ parameters.osName }}/${{ parameters.framework }}/${{ parameters.vsTestPlatform }}/${{ parameters.testProjectName }}/${{ parameters.testResultsFileName }}" $testResultsFileExists = Test-Path $testResultsFileName if ($testResultsFileExists) { @@ -73,9 +75,9 @@ steps: displayName: 'Parse Test Results File' - task: PublishTestResults@2 - displayName: 'Publish Test Results ${{ parameters.testProjectName }},${{ parameters.framework }}' + displayName: 'Publish Test Results ${{ parameters.testProjectName }},${{ parameters.framework }},${{ parameters.vsTestPlatform }}' inputs: testResultsFormat: ${{ parameters.testResultsFormat }} - testResultsFiles: '$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}/${{ parameters.osName }}/${{ parameters.framework }}/${{ parameters.testProjectName }}/${{ parameters.testResultsFileName }}' - testRunTitle: '${{ parameters.testProjectName }} - ${{ parameters.framework }} - ${{ parameters.osName }} | $(TestResults)' + testResultsFiles: '$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}/${{ parameters.osName }}/${{ parameters.framework }}/${{ parameters.vsTestPlatform }}/${{ parameters.testProjectName }}/${{ parameters.testResultsFileName }}' + testRunTitle: '${{ parameters.testProjectName }} - ${{ parameters.framework }} - ${{ parameters.vsTestPlatform }} - ${{ parameters.osName }} | $(TestResults)' condition: and(succeeded(), eq(variables['TestResultsFileExists'], 'true')) \ No newline at end of file diff --git a/build/azure-templates/run-tests-on-os.yml b/build/azure-templates/run-tests-on-os.yml index 8549a4513d..b9498535f7 100644 --- a/build/azure-templates/run-tests-on-os.yml +++ b/build/azure-templates/run-tests-on-os.yml @@ -145,7 +145,7 @@ steps: } $fwork = ConvertFrameworkName($framework) - $testResultDirectory = "$testResultsArtifactDirectory/$testOSName/$framework/$testName" + $testResultDirectory = "$testResultsArtifactDirectory/$testOSName/$framework/$testPlatform/$testName" if (!(Test-Path "$testResultDirectory")) { New-Item "$testResultDirectory" -ItemType Directory -Force } @@ -174,7 +174,7 @@ steps: Start-Sleep -Milliseconds 500 # Execute the jobs in parallel - Start-Job -Name "$testName,$framework" -ScriptBlock $scriptBlock -ArgumentList $testExpression + Start-Job -Name "$testName,$framework,$testPlatform" -ScriptBlock $scriptBlock -ArgumentList $testExpression } } } @@ -200,7 +200,7 @@ steps: } $global:LASTEXITCODE = 0 # Force the script to continue on error - displayName: 'dotnet vstest ${{ parameters.framework }}' + displayName: 'dotnet vstest ${{ parameters.framework }},${{ parameters.vsTestPlatform }}' ignoreLASTEXITCODE: true #- template: 'show-all-files.yml' # Uncomment for debugging @@ -209,7 +209,7 @@ steps: displayName: 'Publish Artifact: ${{ parameters.testResultsArtifactName }}' inputs: targetPath: '$(Build.ArtifactStagingDirectory)/${{ parameters.testResultsArtifactName }}' - ArtifactName: '${{ parameters.testResultsArtifactName }}_${{ parameters.osName }}_${{ parameters.framework }}' + ArtifactName: '${{ parameters.testResultsArtifactName }}_${{ parameters.osName }}_${{ parameters.framework }}_${{ parameters.vsTestPlatform }}' condition: succeededOrFailed() # Due to the fact that it is not possible to loop a task and @@ -223,6 +223,7 @@ steps: parameters: osName: '${{ parameters.osName }}' framework: '${{ parameters.framework }}' + vsTestPlatform: '${{ parameters.vsTestPlatform }}' - pwsh: | $maximumAllowedFailures = '${{ parameters.maximumAllowedFailures }}'