Skip to content

Commit a88a909

Browse files
Copilotbaywet
andauthored
ci(azure): collect all mtp test results
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
1 parent 9d749ca commit a88a909

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.azure-pipelines/ci-build.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pr:
2121
variables:
2222
buildPlatform: 'Any CPU'
2323
buildConfiguration: 'Release'
24+
# Keep in sync with the test project TargetFramework values.
2425
testTargetFramework: 'net10.0'
2526
ProductBinPath: '$(Build.SourcesDirectory)\src\Microsoft.OpenApi\bin\$(BuildConfiguration)'
2627
REGISTRY: 'msgraphprodregistry.azurecr.io'
@@ -112,12 +113,15 @@ extends:
112113
@{ Name = "Microsoft.OpenApi.Tests"; Path = "$(Build.SourcesDirectory)\test\Microsoft.OpenApi.Tests\bin\$(BuildConfiguration)\$targetFramework\Microsoft.OpenApi.Tests.exe" }
113114
)
114115
116+
$exitCode = 0
115117
foreach ($testApplication in $testApplications) {
116118
& $testApplication.Path --report-xunit-trx --report-xunit-trx-filename "$($testApplication.Name).trx" --results-directory $testResultsDirectory --minimum-expected-tests 1
117119
if ($LASTEXITCODE -ne 0) {
118-
exit $LASTEXITCODE
120+
$exitCode = $LASTEXITCODE
119121
}
120122
}
123+
124+
exit $exitCode
121125
displayName: 'test'
122126
123127
- task: PublishTestResults@2

0 commit comments

Comments
 (0)