-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update xUnit to display output on failures #8147
base: main
Are you sure you want to change the base?
Update xUnit to display output on failures #8147
Conversation
b06c5d3
to
20c2b2d
Compare
@grynspan : Could I please get your feedback on this change? |
As we had discussed last week with @plemarquand, this is probably not the approach we want to take. |
4f1349c
to
b8da895
Compare
@@ -82,7 +82,8 @@ extension SwiftPM { | |||
public func execute( | |||
_ args: [String] = [], | |||
packagePath: AbsolutePath? = nil, | |||
env: Environment? = nil | |||
env: Environment? = nil, | |||
errorIfCommandUnsuccessful: Bool = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure there's a more elegant way to do this, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely. Can you offer a suggestion?
Fixtures/Miscellaneous/TestSingleFailureXCTest/Sources/TestFailures/TestFailures.swift
Outdated
Show resolved
Hide resolved
b8da895
to
8a1d353
Compare
@swift-ci please test |
8a1d353
to
91b6163
Compare
@swift-ci please test |
@swift-ci please test |
91b6163
to
12fd457
Compare
@swift-ci please test |
12fd457
to
4f29d57
Compare
@swift-ci please test |
@swift-ci please test linux |
@swift-ci please test linux |
Please test with following pull request: @swift-ci Please test |
@swift-ci please test windows |
0446827
to
c7c13a1
Compare
@swift-ci Please test |
@swift-ci please test windows |
Please test with following pull request: @swift-ci Please test |
For XCTest, the generated xUnit XML file is not helpful when tests fail as it contains the message "failure", which is redundant with the test results. Add a hidden flag (--xunit-message-failure) that will update the XML output to dipslay the result output instead of static "failure" message.
c7c13a1
to
152c651
Compare
@swift-ci please test |
Co-authored-by: Jonathan Grynspan <grynspan@me.com>
@swift-ci please test |
.map { "&#\($0);" } | ||
.joined() | ||
default: | ||
String(character) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: tab went missing
@swift-ci please test macOS |
@swift-ci please test windows |
Modify the XCTest xUnit failure message to display the test result.
Motivation:
The generated xUnit XML file is not helpful when tests fail as it contains the message "failure", which is redundant with the test results.
Modifications:
Update the XML output to display the result output instead of static "failure" message. The failure message may contain irrelevant output, but it's better than the current message of
failure
.Result:
Requires: swiftlang/swift#78300