From 2b500e797ad8d064610df59c6f4a91e6bb5b7219 Mon Sep 17 00:00:00 2001 From: Ernesto Cambuston Date: Sat, 20 Apr 2024 19:48:32 -0700 Subject: [PATCH] fix buildable ref --- Sources/XcodeGenKit/SchemeGenerator.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/XcodeGenKit/SchemeGenerator.swift b/Sources/XcodeGenKit/SchemeGenerator.swift index 1f2a08105..c04a40a7a 100644 --- a/Sources/XcodeGenKit/SchemeGenerator.swift +++ b/Sources/XcodeGenKit/SchemeGenerator.swift @@ -282,9 +282,11 @@ public class SchemeGenerator { XCScheme.TestPlanReference(reference: "container:\(testPlan.path)", default: defaultTestPlanIndex == index) } ?? [] + let testMacroExpansionBuildableRef = testBuildTargetEntries.map(\.buildableReference).contains(buildableReference) ? buildableReference : testBuildTargetEntries.first?.buildableReference + let testAction = XCScheme.TestAction( buildConfiguration: scheme.test?.config ?? defaultDebugConfig.name, - macroExpansion: buildableReference, + macroExpansion: testMacroExpansionBuildableRef, testables: testables, testPlans: testPlans.isEmpty ? nil : testPlans, preActions: scheme.test?.preActions.map(getExecutionAction) ?? [],