Skip to content

Commit 173a581

Browse files
authored
Merge pull request #2395 from ahoppen/only-build-requested-test-target
Only build requested test product if one is specified using --test-product
2 parents 4cfbe41 + d2a2be4 commit 173a581

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Commands/SwiftTestTool.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ public class SwiftTestTool: SwiftTool<TestToolOptions> {
357357
let buildDescription = try getBuildDescription(graph: graph)
358358

359359
if options.shouldBuildTests {
360-
try build(buildDescription: buildDescription, subset: .allIncludingTests)
360+
let subset = options.testProduct.map(BuildSubset.product) ?? .allIncludingTests
361+
try build(buildDescription: buildDescription, subset: subset)
361362
}
362363

363364
// Find the test product.

0 commit comments

Comments
 (0)