mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
non-mutable way of creating [XCScheme.TestPlanReference]
This commit is contained in:
parent
cb90212641
commit
6a02474385
@ -194,18 +194,15 @@ public class SchemeGenerator {
|
||||
let launchVariables = scheme.run.flatMap { $0.environmentVariables.isEmpty ? nil : $0.environmentVariables }
|
||||
let profileVariables = scheme.profile.flatMap { $0.environmentVariables.isEmpty ? nil : $0.environmentVariables }
|
||||
|
||||
var testPlans: [XCScheme.TestPlanReference]?
|
||||
if let plans = scheme.test?.testPlans, !plans.isEmpty {
|
||||
testPlans = plans.enumerated().map { index, path in
|
||||
.init(reference: "container:\(path)", default: index == 0)
|
||||
}
|
||||
}
|
||||
let testPlans = scheme.test?.testPlans.enumerated().map { index, path in
|
||||
XCScheme.TestPlanReference(reference: "container:\(path)", default: index == 0)
|
||||
} ?? []
|
||||
|
||||
let testAction = XCScheme.TestAction(
|
||||
buildConfiguration: scheme.test?.config ?? defaultDebugConfig.name,
|
||||
macroExpansion: buildableReference,
|
||||
testables: testables,
|
||||
testPlans: testPlans,
|
||||
testPlans: testPlans.isEmpty ? nil : testPlans,
|
||||
preActions: scheme.test?.preActions.map(getExecutionAction) ?? [],
|
||||
postActions: scheme.test?.postActions.map(getExecutionAction) ?? [],
|
||||
selectedDebuggerIdentifier: (scheme.test?.debugEnabled ?? Scheme.Test.debugEnabledDefault) ? XCScheme.defaultDebugger : "",
|
||||
|
Loading…
Reference in New Issue
Block a user