Azure Pipelines: Upload test logs as artifacts#2575
Merged
Conversation
ff48a28 to
88c24a7
Compare
CaseyCarter
approved these changes
Feb 24, 2022
barcharcraz
approved these changes
Mar 4, 2022
Member
Author
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2557.
tools/scripts/print_failures.pyto understand the XML produced by--xunit-xml-output. This detects.xmlversus any other extension and acts accordingly. Like the JSON codepath, success is silence. Note that a"testcase"element can have 0 or 1"failure"elements; looping withfor failure_elemwas the most elegant way to handle this optionality. I checkedlit's generation logic to make sure that I wasn't missing any potential forms of output (AFAICT, both unexpected failures and unexpected passes are reported with"failure"here.) The CRLF replacement needed for JSON doesn't appear to be needed for XML.publishArtifactwas disabled a year ago due to Azure Pipelines: 11 TiB of Pipeline Artifacts is excessive #1653.publishstep, that will uploadtest-results.xml. This is set to happen only if a previous stepfailed()(but not if the run is cancelled).We'll still be able to rely on the error output that's immediately visible in Azure Pipelines for most failures, but if we encounter lengthy output (in scenarios like #2449, or for header units where the command lines are extremely long), then the XML output will be available for easy investigation.