-
Notifications
You must be signed in to change notification settings - Fork 266
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
[SR-8436] xctest should have an option to emit parsable output #361
Comments
@swift-ci create |
If you have thoughts on the approach here I might be interested in implementing this. |
That would be awesome! Have you seen Swift's parsable output? It would be great if we can make something similar in XCTest. /cc @briancroom @ddunbar |
Yes I have. So we'd be willing to entirely transform the output coming from Darwin's XCTest? |
We basically need two implementations here: 1. corelibs-xctest for Linux. This should be somewhat straightforward. We can add a -parseable-output option to the test binaries. Lets wait for @briancroom's thoughts on this. |
This is indeed a long-standing request for Darwin XCTest as well. If we can come up with a format that we're comfortable with, I think we could provide an implementation there as well, via an opt-in command line argument. I assume you would like this to be output in a streaming fashion as the tests are run? One complication to any attempt at parsing test results via stdout/stderr is that, since arbitrary user code is running in the process, XCTest's output can end up interleaved with output from the tests themselves. There's not really anything we can do about that besides moving to a model of using a separate pipe for result reporting, which is what Xcode does when running tests through the tool. The structured format being discussed here could potentially be fed either to stderr or to an alternate sink (e.g. a named pipe) to provide a solution here. |
Yep, a streaming output on stderr/separate pipe sounds perfect! |
In the meantime, here's a PR that at least allows making test observations (i.e. reports) configurable in situations where you can call XCTMain directly (i.e. LinuxMain.swift) #306 |
Additional Detail from JIRA
md5: 5c1c8b6daff9759845d17ee54c42f4a4
Issue Description:
Similar to the Swift compiler, xctest should provide a way to emit parsable output so the clients can control and format the results.
The text was updated successfully, but these errors were encountered: