Skip to content

Pass through swift-testing's experimental JSON streams from swift test #7534

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
merged 3 commits into from
May 8, 2024
Merged
Changes from 1 commit
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
13 changes: 12 additions & 1 deletion Sources/Commands/SwiftTestCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ 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: ArgumentHelp("", visibility: .hidden))
var configurationPath: AbsolutePath?

/// Path where swift-testing's JSON output should be written.
@Option(name: .customLong("experimental-event-stream-output"),
help: ArgumentHelp("", visibility: .hidden))
var eventStreamOutputPath: AbsolutePath?
}

/// Tests filtering specifier, which is used to filter tests to run.
Expand Down Expand Up @@ -688,9 +698,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