generate test plan references in schemes

This commit is contained in:
yonaskolb committed 2019-11-10 14:26:10 +11:00
1 parent 118c14dfe1
commit d716ffe5d7
2 files changed
+32

No files matched your search

@@ -194,10 +194,18 @@ 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 testAction = XCScheme.TestAction(
buildConfiguration: scheme.test?.config ?? defaultDebugConfig.name,
macroExpansion: buildableReference,
testables: testables,
testPlans: testPlans,
preActions: scheme.test?.preActions.map(getExecutionAction) ?? [],
postActions: scheme.test?.postActions.map(getExecutionAction) ?? [],
selectedDebuggerIdentifier: (scheme.test?.debugEnabled ?? Scheme.Test.debugEnabledDefault) ? XCScheme.defaultDebugger : "",