Skip to content

[6.0] Pass through experimental swift-testing flags #7564

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Sources/Commands/SwiftTestCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,21 @@ struct TestCommandOptions: ParsableArguments {
var enableExperimentalTestOutput: Bool {
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?
}

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

let additionalArguments = ["--list-tests"] + CommandLine.arguments.dropFirst()
let runner = TestRunner(
bundlePaths: testProducts.map(\.binaryPath),
additionalArguments: ["--list-tests"],
additionalArguments: additionalArguments,
cancellator: swiftCommandState.cancellator,
toolchain: toolchain,
testEnv: testEnv,
Expand Down