-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,38 @@ struct SharedOptions: ParsableArguments { | |
var testProduct: String? | ||
} | ||
|
||
struct TestEventStreamOptions: ParsableArguments { | ||
/// Legacy equivalent of ``configurationPath``. | ||
@Option(name: .customLong("experimental-configuration-path"), | ||
help: .private) | ||
var experimentalConfigurationPath: AbsolutePath? | ||
|
||
/// Path where swift-testing's JSON configuration should be read. | ||
@Option(name: .customLong("configuration-path"), | ||
help: .hidden) | ||
var configurationPath: AbsolutePath? | ||
|
||
/// Legacy equivalent of ``eventStreamOutputPath``. | ||
@Option(name: .customLong("experimental-event-stream-output"), | ||
help: .private) | ||
var experimentalEventStreamOutputPath: AbsolutePath? | ||
|
||
/// Path where swift-testing's JSON output should be written. | ||
@Option(name: .customLong("event-stream-output-path"), | ||
help: .hidden) | ||
var eventStreamOutputPath: AbsolutePath? | ||
|
||
/// Legacy equivalent of ``eventStreamVersion``. | ||
@Option(name: .customLong("experimental-event-stream-version"), | ||
help: .private) | ||
var experimentalEventStreamVersion: Int? | ||
|
||
/// The schema version of swift-testing's JSON input/output. | ||
@Option(name: .customLong("event-stream-version"), | ||
help: .hidden) | ||
var eventStreamVersion: Int? | ||
} | ||
|
||
struct TestCommandOptions: ParsableArguments { | ||
@OptionGroup() | ||
var globalOptions: GlobalOptions | ||
|
@@ -91,6 +123,10 @@ struct TestCommandOptions: ParsableArguments { | |
@OptionGroup() | ||
var testLibraryOptions: TestLibraryOptions | ||
|
||
/// Options for Swift Testing's event stream. | ||
@OptionGroup() | ||
var testEventStreamOptions: TestEventStreamOptions | ||
|
||
/// If tests should run in parallel mode. | ||
@Flag(name: .customLong("parallel"), | ||
inversion: .prefixedNo, | ||
|
@@ -156,21 +192,6 @@ struct TestCommandOptions: ParsableArguments { | |
return testOutput == .experimentalSummary | ||
} | ||
|
||
/// Path where swift-testing's JSON configuration should be read. | ||
@Option(name: .customLong("experimental-configuration-path"), | ||
help: .hidden) | ||
var configurationPath: AbsolutePath? | ||
|
||
/// Path where swift-testing's JSON output should be written. | ||
@Option(name: .customLong("experimental-event-stream-output"), | ||
help: .hidden) | ||
var eventStreamOutputPath: AbsolutePath? | ||
|
||
/// The schema version of swift-testing's JSON input/output. | ||
@Option(name: .customLong("experimental-event-stream-version"), | ||
help: .hidden) | ||
var eventStreamVersion: Int? | ||
|
||
@OptionGroup(visibility: .hidden) | ||
package var traits: TraitOptions | ||
} | ||
|
@@ -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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. This is in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
@OptionGroup(visibility: .hidden) | ||
package var traits: TraitOptions | ||
|
||
|
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.