Skip to content

Commit

Permalink
Merge pull request #362 from apple/adjust-to-swiftpm-sr-12050-fix
Browse files Browse the repository at this point in the history
Adjust the SwiftPMWorkspaceTests.testMultiTargetSwift() test to account for the SwiftPM fix for SR-12050
  • Loading branch information
abertelrud committed Jan 21, 2021
2 parents d9b2d65 + ad735d4 commit c412423
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Tests/SKSwiftPMWorkspaceTests/SwiftPMWorkspaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,18 @@ final class SwiftPMWorkspaceTests: XCTestCase {
let arguments = ws.settings(for: aswift.asURI, .swift)!.compilerArguments
check(aswift.pathString, arguments: arguments)
checkNot(bswift.pathString, arguments: arguments)
check(
"-I", packageRoot.appending(components: "Sources", "libC", "include").pathString,
arguments: arguments)
// Temporary conditional to work around revlock between SourceKit-LSP and SwiftPM
// as a result of fix for SR-12050. Can be removed when that fix has been merged.
if arguments.joined(separator: " ").contains("-Xcc -I -Xcc") {
check(
"-Xcc", "-I", "-Xcc", packageRoot.appending(components: "Sources", "libC", "include").pathString,
arguments: arguments)
}
else {
check(
"-I", packageRoot.appending(components: "Sources", "libC", "include").pathString,
arguments: arguments)
}

let argumentsB = ws.settings(for: bswift.asURI, .swift)!.compilerArguments
check(bswift.pathString, arguments: argumentsB)
Expand Down

0 comments on commit c412423

Please sign in to comment.