-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add the formalized Swift Testing event stream arguments to swift test
.
#7768
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
Add the formalized Swift Testing event stream arguments to swift test
.
#7768
Conversation
This PR adds `--configuration-path`, `--event-stream-output-path`, and `--event-stream-version` to `swift test`. For more information, see the Swift Testing API proposal [here](https://github.com/apple/swift-testing/blob/main/Documentation/Proposals/0002-json-abi.md).
@swift-ci please test |
See also swiftlang/swift-testing#479 |
struct TestEventStreamOptions: ParsableArguments { | ||
/// Legacy equivalent of ``configurationPath``. | ||
@Option(name: .customLong("experimental-configuration-path"), | ||
help: .private) |
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.
What's private vs hidden? Haven't seen private before 🤔
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.
Hidden means it still shows up in verbose help. Private means it is never shown in help.
@@ -656,6 +677,10 @@ extension SwiftTestCommand { | |||
@OptionGroup() | |||
var testLibraryOptions: TestLibraryOptions | |||
|
|||
/// Options for Swift Testing's event stream. | |||
@OptionGroup() | |||
var testEventStreamOptions: TestEventStreamOptions |
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.
Is this really for just configuration rather than the stream options?
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 don't understand, sorry?
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.
This is in list
. Does list
actually need all these, or does it just need the configuration path?
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.
list
can use them all now! See swiftlang/swift-testing#511
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --event-stream-output-path ... --event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Support for these arguments with `swift test list` is tracked by swiftlang/swift-package-manager#7768. Resolves #506. Resolves rdar://130627856. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
This PR adds
--configuration-path
,--event-stream-output-path
, and--event-stream-version
toswift test
.For more information, see the Swift Testing API proposal here.