mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
generate test plan references in schemes
This commit is contained in:
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 : "",
|
||||
|
||||
Reference in new issue
Block a user