Skip to content
Draft
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
2 changes: 2 additions & 0 deletions Sources/Basics/Process.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ extension ProcessInfo {
.windows
#elseif os(FreeBSD)
.freebsd
#elseif os(Android)
.android
#else
.unknown
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@ extension BuildSystemProvider.Kind {
if let triple {
tripleString = triple
} else {
do {
tripleString = try UserToolchain.default.targetTriple.platformBuildPathComponent
} catch {
tripleString = ""
}
tripleString = try UserToolchain.default.targetTriple.platformBuildPathComponent
}
switch self {
case .native:
Expand Down
2 changes: 1 addition & 1 deletion Sources/_InternalTestSupport/SwiftPMProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension SwiftPM {
}

public var xctestBinaryPath: AbsolutePath {
Self.xctestBinaryPath(for: RelativePath("swift-package-manager"))
Self.xctestBinaryPath(for: RelativePath(self.executableName))
}

public static func xctestBinaryPath(for executableName: RelativePath) -> AbsolutePath {
Expand Down
13 changes: 12 additions & 1 deletion Sources/_InternalTestSupport/SwiftTesting+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@ public func expectFileExists(

#expect(
localFileSystem.exists(path),
"Files '\(path)' does not exist.",
"File '\(path)' does not exist.",
sourceLocation: sourceLocation,
)
}

public func requireFileExists(
at path: AbsolutePath,
sourceLocation: SourceLocation = #_sourceLocation,
) throws {
try #require(
localFileSystem.exists(path),
"File '\(path)' does not exist.",
sourceLocation: sourceLocation,
)
}
Expand Down
14 changes: 14 additions & 0 deletions Sources/_InternalTestSupport/SwiftTesting+TraitsBug.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ extension Trait where Self == Testing.Bug {
)
}

public static var IssueWindowsAbsoluteAndRelativePathTestFailures: Self {
issue(
"https://github.com/swiftlang/swift-package-manager/issues/8511",
relationship: .defect,
)
}

public static var IssueWindowsLongPath: Self {
.issue(
// "https://github.com/swiftlang/swift-tools-support-core/pull/521",
Expand All @@ -69,6 +76,13 @@ extension Trait where Self == Testing.Bug {
)
}

public static var IssueSwiftBuildSpaceInPath: Self {
.issue(
"https://github.com/swiftlang/swift-package-manager/issues/8400",
relationship: .defect,
)
}

public static var IssueSwiftBuildLinuxRunnable: Self {
.issue(
"https://github.com/swiftlang/swift-package-manager/issues/8416",
Expand Down
5 changes: 3 additions & 2 deletions Tests/BuildTests/BuildSystemDelegateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ struct BuildSystemDelegateTests {
"log didn't contain expected linker diagnostics. stderr: '\(stderr)')",
)
case .swiftbuild:
let searchPathRegex = try Regex("warning:(.*)Search path 'foobar' not found")
#expect(
stderr.contains("warning: Search path 'foobar' not found"),
stderr.contains(searchPathRegex),
"log didn't contain expected linker diagnostics. stderr: '\(stdout)",
)
#expect(
!stdout.contains("warning: Search path 'foobar' not found"),
!stdout.contains(searchPathRegex),
"log didn't contain expected linker diagnostics. stderr: '\(stderr)')",
)
case .xcode:
Expand Down
Loading