From 8898e85fd0452054ca2434f60a00772244c1be42 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Tue, 11 Nov 2025 10:10:04 -0500 Subject: [PATCH] Add experimental max parallelization width option for Swift Testing. Adds `swift test --experimental-maximum-parallelization-width`. This flag passes through to Swift Testing. We may end up just reusing `--num-workers` but as it's not exactly the same feature, I'm keeping it separate for now pending discussion and review. --- Sources/Commands/SwiftTestCommand.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/Commands/SwiftTestCommand.swift b/Sources/Commands/SwiftTestCommand.swift index d2eefa5fd97..10c3b280c29 100644 --- a/Sources/Commands/SwiftTestCommand.swift +++ b/Sources/Commands/SwiftTestCommand.swift @@ -162,6 +162,12 @@ struct TestCommandOptions: ParsableArguments { help: "Number of tests to execute in parallel.") var numberOfWorkers: Int? + /// Width of task group used by Swift Testing. + /// + /// This argument is consumed by Swift Testing and is passed through verbatim by SwiftPM. + @Option(help: .hidden) + var experimentalMaximumParallelizationWidth: Int? = nil + /// List the tests and exit. @Flag(name: [.customLong("list-tests"), .customShort("l")], help: "Lists test methods in specifier format.")