Skip to content

Commit 2fe0bbb

Browse files
committed
Fix an additional Linux failure
1 parent 2d91375 commit 2fe0bbb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Sources/Commands/Utilities/TestingSupport.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,24 @@ extension SwiftTool {
212212
library: BuildParameters.Testing.Library
213213
) throws -> BuildParameters {
214214
var parameters = try self.buildParameters()
215+
216+
var explicitlyEnabledDiscovery = false
217+
var explicitlySpecifiedPath: AbsolutePath?
218+
if case let .entryPointExecutable(
219+
explicitlyEnabledDiscoveryValue,
220+
explicitlySpecifiedPathValue
221+
) = parameters.testingParameters.testProductStyle {
222+
explicitlyEnabledDiscovery = explicitlyEnabledDiscoveryValue
223+
explicitlySpecifiedPath = explicitlySpecifiedPathValue
224+
}
215225
parameters.testingParameters = .init(
216226
configuration: parameters.configuration,
217227
targetTriple: parameters.targetTriple,
228+
forceTestDiscovery: explicitlyEnabledDiscovery,
229+
testEntryPointPath: explicitlySpecifiedPath,
218230
library: library
219231
)
232+
220233
parameters.testingParameters.enableCodeCoverage = enableCodeCoverage
221234
// for test commands, we normally enable building with testability
222235
// but we let users override this with a flag

0 commit comments

Comments
 (0)