Skip to content

Commit f177504

Browse files
[6.0] Pass through experimental swift-testing flags (#7564)
Explanation: Pass through `--experimental-configuration-path`, `--experimental-event-stream-output`, and `--experimental-event-stream-version` as used by swift-testing. These flags are needed for continued experimental support of swift-testing when using the Swift 6 toolchain. Scope: Hidden flags in `swift test`. Original PR: #7534, #7551 Risk: No obvious risk. These flags have no effect on `swift test` itself and are simply passed through verbatim to the swift-testing test executable. Testing: Tested at-desk that the flags are seen by swift-testing with an appropriate toolchain. Reviewer: @bnbarham, @MaxDesiatov, @stmontgomery --------- Co-authored-by: Max Desiatov <[email protected]>
1 parent fcb5bad commit f177504

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Sources/Commands/SwiftTestCommand.swift

+17-1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,21 @@ struct TestCommandOptions: ParsableArguments {
154154
var enableExperimentalTestOutput: Bool {
155155
return testOutput == .experimentalSummary
156156
}
157+
158+
/// Path where swift-testing's JSON configuration should be read.
159+
@Option(name: .customLong("experimental-configuration-path"),
160+
help: .hidden)
161+
var configurationPath: AbsolutePath?
162+
163+
/// Path where swift-testing's JSON output should be written.
164+
@Option(name: .customLong("experimental-event-stream-output"),
165+
help: .hidden)
166+
var eventStreamOutputPath: AbsolutePath?
167+
168+
/// The schema version of swift-testing's JSON input/output.
169+
@Option(name: .customLong("experimental-event-stream-version"),
170+
help: .hidden)
171+
var eventStreamVersion: Int?
157172
}
158173

159174
/// Tests filtering specifier, which is used to filter tests to run.
@@ -682,9 +697,10 @@ extension SwiftTestCommand {
682697
sanitizers: globalOptions.build.sanitizers
683698
)
684699

700+
let additionalArguments = ["--list-tests"] + CommandLine.arguments.dropFirst()
685701
let runner = TestRunner(
686702
bundlePaths: testProducts.map(\.binaryPath),
687-
additionalArguments: ["--list-tests"],
703+
additionalArguments: additionalArguments,
688704
cancellator: swiftCommandState.cancellator,
689705
toolchain: toolchain,
690706
testEnv: testEnv,

0 commit comments

Comments
 (0)