Skip to content

Commit 0d73517

Browse files
committed
Fix hard-coded path to FoundationEssentialsTests resources
SwiftPM used to incorrectly build tests for both host and target. That has been fixed by swiftlang/swift-package-manager#7879. The fix makes sure that if there are any direct macro dependencies in test targets xctest bundle is only built for "host". This means that the hard-coded resources path needs to be updated to include "-tool" suffix.
1 parent 0ffd606 commit 0d73517

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/FoundationEssentialsTests/ResourceUtilities.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func testData(forResource resource: String, withExtension ext: String, subdirect
5858
// Hard-coding the path is unfortunate, but a temporary need until we have a better way to handle this
5959
var path = URL(filePath: ProcessInfo.processInfo.arguments[0])
6060
.deletingLastPathComponent()
61-
.appending(component: "swift-foundation_FoundationEssentialsTests.resources", directoryHint: .isDirectory)
61+
.appending(component: "swift-foundation_FoundationEssentialsTests-tool.resources", directoryHint: .isDirectory)
6262
.appending(component: "Resources", directoryHint: .isDirectory)
6363
if let subdirectory {
6464
path.append(path: subdirectory, directoryHint: .isDirectory)

0 commit comments

Comments
 (0)