Skip to content

Commit bd7cead

Browse files
authored
Revert "Enable more plugin related tests for non-macOS platforms (#8477)"
This reverts commit 5da13be.
1 parent 5da13be commit bd7cead

File tree

5 files changed

+35
-14
lines changed

5 files changed

+35
-14
lines changed

Sources/SwiftBuildSupport/PackagePIFBuilder.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -651,9 +651,9 @@ extension PackagePIFBuilder.LinkedPackageBinary {
651651

652652
init?(dependency: ResolvedModule.Dependency, package: ResolvedPackage) {
653653
switch dependency {
654-
case .product(let productDependency, _):
655-
guard productDependency.hasSourceTargets else { return nil }
656-
self.init(name: productDependency.name, packageName: package.name, type: .product)
654+
case .product(let producutDependency, _):
655+
guard producutDependency.hasSourceTargets else { return nil }
656+
self.init(name: producutDependency.name, packageName: package.name, type: .product)
657657

658658
case .module(let moduleDependency, _):
659659
self.init(module: moduleDependency, package: package)

Sources/SwiftBuildSupport/PackagePIFProjectBuilder+Modules.swift

+8-2
Original file line numberDiff line numberDiff line change
@@ -504,14 +504,20 @@ extension PackagePIFProjectBuilder {
504504
}
505505

506506
// Additional settings for the linker.
507+
let baselineOTHER_LDFLAGS: [String]
507508
let enableDuplicateLinkageCulling = UserDefaults.standard.bool(
508509
forKey: "IDESwiftPackagesEnableDuplicateLinkageCulling",
509510
defaultValue: true
510511
)
511512
if enableDuplicateLinkageCulling {
512-
impartedSettings[.LD_WARN_DUPLICATE_LIBRARIES] = "NO"
513+
baselineOTHER_LDFLAGS = [
514+
"-Wl,-no_warn_duplicate_libraries",
515+
"$(inherited)"
516+
]
517+
} else {
518+
baselineOTHER_LDFLAGS = ["$(inherited)"]
513519
}
514-
impartedSettings[.OTHER_LDFLAGS] = (sourceModule.isCxx ? ["-lc++"] : []) + ["$(inherited)"]
520+
impartedSettings[.OTHER_LDFLAGS] = (sourceModule.isCxx ? ["-lc++"] : []) + baselineOTHER_LDFLAGS
515521
impartedSettings[.OTHER_LDRFLAGS] = []
516522
log(
517523
.debug,

Tests/CommandsTests/BuildCommandTests.swift

+9
Original file line numberDiff line numberDiff line change
@@ -956,4 +956,13 @@ class BuildCommandSwiftBuildTests: BuildCommandTestCases {
956956

957957
try await super.testBuildSystemDefaultSettings()
958958
}
959+
960+
override func testBuildCompleteMessage() async throws {
961+
#if os(Linux)
962+
throw XCTSkip("SWBINTTODO: Need to properly set LD_LIBRARY_PATH on linux")
963+
#else
964+
try await super.testBuildCompleteMessage()
965+
#endif
966+
}
967+
959968
}

Tests/CommandsTests/PackageCommandTests.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -3898,9 +3898,15 @@ class PackageCommandSwiftBuildTests: PackageCommandTestCase {
38983898
}
38993899

39003900
override func testCommandPluginBuildingCallbacks() async throws {
3901-
throw XCTSkip("SWBINTTODO: Test fails because plugin is not producing expected output to stdout.")
3901+
throw XCTSkip("SWBINTTODO: Test fails as plugins are not currenty supported")
39023902
}
39033903
override func testCommandPluginBuildTestability() async throws {
39043904
throw XCTSkip("SWBINTTODO: Test fails as plugins are not currenty supported")
39053905
}
3906+
3907+
#if !os(macOS)
3908+
override func testCommandPluginTestingCallbacks() async throws {
3909+
throw XCTSkip("SWBINTTODO: Test fails on inability to find libclang on Linux. Also, plugins are not currently supported")
3910+
}
3911+
#endif
39063912
}

Tests/CommandsTests/TestCommandTests.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -701,35 +701,35 @@ class TestCommandSwiftBuildTests: TestCommandTestCase {
701701

702702
#if !os(macOS)
703703
override func testSwiftTestXMLOutputVerifySingleTestFailureMessageWithFlagDisabledXCTest() async throws {
704-
throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479")
704+
throw XCTSkip("Result XML could not be found. The build fails due to an LD_LIBRARY_PATH issue finding swift core libraries. https://github.com/swiftlang/swift-package-manager/issues/8416")
705705
}
706706

707707
override func testSwiftTestXMLOutputVerifyMultipleTestFailureMessageWithFlagEnabledXCTest() async throws {
708-
throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479")
708+
throw XCTSkip("Result XML could not be found. The build fails due to an LD_LIBRARY_PATH issue finding swift core libraries. https://github.com/swiftlang/swift-package-manager/issues/8416")
709709
}
710710

711711
override func testSwiftTestXMLOutputVerifySingleTestFailureMessageWithFlagEnabledXCTest() async throws {
712-
throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479")
712+
throw XCTSkip("Result XML could not be found. The build fails due to an LD_LIBRARY_PATH issue finding swift core libraries. https://github.com/swiftlang/swift-package-manager/issues/8416")
713713
}
714714

715715
override func testSwiftTestXMLOutputVerifyMultipleTestFailureMessageWithFlagDisabledXCTest() async throws {
716-
throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479")
716+
throw XCTSkip("Result XML could not be found. The build fails due to an LD_LIBRARY_PATH issue finding swift core libraries. https://github.com/swiftlang/swift-package-manager/issues/8416")
717717
}
718718

719719
override func testSwiftTestSkip() async throws {
720-
throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479")
720+
throw XCTSkip("This fails due to a linker error on Linux. https://github.com/swiftlang/swift-package-manager/issues/8439")
721721
}
722722

723723
override func testSwiftTestXMLOutputWhenEmpty() async throws {
724-
throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479")
724+
throw XCTSkip("This fails due to a linker error on Linux. https://github.com/swiftlang/swift-package-manager/issues/8439")
725725
}
726726

727727
override func testSwiftTestFilter() async throws {
728-
throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479")
728+
throw XCTSkip("This fails due to an unknown linker error on Linux. https://github.com/swiftlang/swift-package-manager/issues/8439")
729729
}
730730

731731
override func testSwiftTestParallel() async throws {
732-
throw XCTSkip("Result XML could not be found. The build fails because of missing test helper generation logic for non-macOS platforms: https://github.com/swiftlang/swift-package-manager/issues/8479")
732+
throw XCTSkip("This fails due to an unknown linker error on Linux. https://github.com/swiftlang/swift-package-manager/issues/8439")
733733
}
734734
#endif
735735
}

0 commit comments

Comments
 (0)