[devops] Collect test results and upload them for the Windows tests. (#18386)

Also make the tests log to stdout so that we can see what happened (i.e. went
wrong) from the logs.
This commit is contained in:
Rolf Bjarne Kvinge 2023-06-01 10:39:38 +02:00 коммит произвёл GitHub
Родитель d2b6a5afb6
Коммит 722bc0c555
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 25 добавлений и 0 удалений

Просмотреть файл

@ -138,9 +138,34 @@ steps:
"$(Build.SourcesDirectory)/xamarin-macios/tests/dotnet/UnitTests/DotNetUnitTests.csproj" `
--filter Category=Windows `
--verbosity quiet `
"--results-directory:$(Build.SourcesDirectory)/xamarin-macios/jenkins-results/" `
"--logger:console;verbosity=detailed" `
"--logger:trx;LogFileName=$(Build.SourcesDirectory)/xamarin-macios/jenkins-results/windows-dotnet-tests.trx" `
"--logger:html;LogFileName=$(Build.SourcesDirectory)/xamarin-macios/jenkins-results/windows-dotnet-tests.html" `
"-bl:$(Build.SourcesDirectory)/xamarin-macios/tests/dotnet/Windows/run-dotnet-tests.binlog"
displayName: 'Run .NET tests'
# Archive files for the Html Report so that the report can be easily uploaded as artifacts of the build.
- task: ArchiveFiles@1
displayName: 'Archive HtmlReport'
inputs:
rootFolder: '$(Build.SourcesDirectory)/xamarin-macios/jenkins-results'
includeRootFolder: false
archiveFile: '$(Build.ArtifactStagingDirectory)/HtmlReport.zip'
continueOnError: true
condition: succeededOrFailed()
# Create HtmlReport artifact. This serves two purposes:
# 1. It is the way we are going to share the HtmlReport with the publish_html job that is executed on a Windows machine.
# 2. Users can download this if they want.
- task: PublishPipelineArtifact@1
displayName: 'Publish Artifact: HtmlReport'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)/HtmlReport.zip'
artifactName: '${{ parameters.uploadPrefix }}HtmlReport-windows-integration-$(System.JobAttempt)'
continueOnError: true
condition: succeededOrFailed()
- pwsh: |
Write-Host "Run windows tests."
Write-Host "Mac agent to be used:"