Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 16 additions & 24 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -991,28 +991,6 @@ let package = Package(
name: "SwiftBuildSupportTests",
dependencies: ["SwiftBuildSupport", "_InternalTestSupport", "_InternalBuildTestSupport"]
),
// Examples (These are built to ensure they stay up to date with the API.)
.executableTarget(
name: "package-info",
dependencies: ["Workspace"],
path: "Examples/package-info/Sources/package-info"
)
],
swiftLanguageModes: [.v5]
)

#if canImport(Darwin)
package.targets.append(contentsOf: [
.executableTarget(
name: "swiftpm-testing-helper"
)
])
#endif

// rdar://101868275 "error: cannot find 'XCTAssertEqual' in scope" can affect almost any functional test, so we flat out
// disable them all until we know what is going on
if ProcessInfo.processInfo.environment["SWIFTCI_DISABLE_SDK_DEPENDENT_TESTS"] == nil {
package.targets.append(contentsOf: [
.testTarget(
name: "FunctionalTests",
dependencies: [
Expand Down Expand Up @@ -1055,9 +1033,23 @@ if ProcessInfo.processInfo.environment["SWIFTCI_DISABLE_SDK_DEPENDENT_TESTS"] ==
"dummy-swiftc",
]
),
])
}
// Examples (These are built to ensure they stay up to date with the API.)
.executableTarget(
name: "package-info",
dependencies: ["Workspace"],
path: "Examples/package-info/Sources/package-info"
),
],
swiftLanguageModes: [.v5]
)

#if canImport(Darwin)
package.targets.append(contentsOf: [
.executableTarget(
name: "swiftpm-testing-helper"
)
])
#endif

func swiftSyntaxDependencies(_ names: [String]) -> [Target.Dependency] {
/// Whether swift-syntax is being built as a single dynamic library instead of as a separate library per module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,17 @@ extension Trait where Self == Testing.ConditionTrait {

// Enabled if the toolchain has supported features
public static var supportsSupportedFeatures: Self {
enabled("skipping because test environment compiler doesn't support `-print-supported-features`") {
(try? UserToolchain.default)!.supportsSupportedFeatures
let isEnabled: Bool
let errorInfo: String
do {
isEnabled = try UserToolchain.default.supportsSupportedFeatures
errorInfo = ""
} catch {
isEnabled = false
errorInfo = "Error: \(error)"
}
return enabled("Skipping because test environment compiler doesn't support `-print-supported-features`.\(errorInfo)") {
isEnabled
}
}

Expand Down