Skip to content

Commit a30d76d

Browse files
committed
Fix some failing macOS tests (due to changes in the build process)
1 parent 28bbf3d commit a30d76d

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

Tests/BuildTests/BuildPlanTests.swift

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,17 +1146,13 @@ final class BuildPlanTests: XCTestCase {
11461146
))
11471147

11481148
XCTAssertEqual(Set(result.productMap.keys.map(\.productName)), ["APackageTests"])
1149-
#if os(macOS)
1150-
XCTAssertEqual(Set(result.targetMap.keys.map(\.moduleName)), ["ATarget", "BTarget", "ATargetTests"])
1151-
#else
11521149
XCTAssertEqual(Set(result.targetMap.keys.map(\.moduleName)), [
11531150
"APackageTests",
11541151
"APackageDiscoveredTests",
11551152
"ATarget",
11561153
"ATargetTests",
11571154
"BTarget",
11581155
])
1159-
#endif
11601156
}
11611157

11621158
func testBasicReleasePackage() throws {
@@ -2213,13 +2209,7 @@ final class BuildPlanTests: XCTestCase {
22132209
observabilityScope: observability.topScope
22142210
))
22152211
result.checkProductsCount(1)
2216-
#if os(macOS)
2217-
result.checkTargetsCount(2)
2218-
#else
2219-
// On non-Apple platforms, when a custom entry point file is present (e.g. XCTMain.swift), there is one
2220-
// additional target for the synthesized test entry point.
22212212
result.checkTargetsCount(3)
2222-
#endif
22232213

22242214
let buildPath = result.plan.productsBuildPath
22252215

@@ -2288,6 +2278,8 @@ final class BuildPlanTests: XCTestCase {
22882278
buildPath.appending(components: "Modules", "Foo.swiftmodule").pathString,
22892279
"-Xlinker", "-add_ast_path", "-Xlinker",
22902280
buildPath.appending(components: "Modules", "FooTests.swiftmodule").pathString,
2281+
"-Xlinker", "-add_ast_path", "-Xlinker",
2282+
buildPath.appending(components: "PkgPackageTests.build", "PkgPackageTests.swiftmodule").pathString,
22912283
"-g",
22922284
]
22932285
)

0 commit comments

Comments
 (0)