@@ -4754,7 +4754,7 @@ fileprivate struct TaskConstructionTests: CoreBasedTests {
4754
4754
}
4755
4755
4756
4756
/// Check recursive header search paths.
4757
- @Test(.requireSDKs(.macOS ))
4757
+ @Test(.requireSDKs(.host ))
4758
4758
func recursiveHeaderSearchPaths() async throws {
4759
4759
let testProject = TestProject(
4760
4760
"aProject",
@@ -4798,23 +4798,26 @@ fileprivate struct TaskConstructionTests: CoreBasedTests {
4798
4798
await tester.checkBuild(fs: fs) { results in
4799
4799
results.checkTarget("Tool") { target in
4800
4800
results.checkTask(.matchTarget(target), .matchRuleType("CompileC")) { task in
4801
+ let buildProductsDirSuffix = RunDestinationInfo.host.builtProductsDirSuffix
4801
4802
let iQuoteArgs = task.commandLine.enumerated().filter { (i, arg) in
4802
4803
(task.commandLine[safe: i - 1]?.asString ?? "") == "-iquote"
4803
4804
}.map{ $0.1.asString }
4804
4805
let capIArgs = task.commandLine.filter{ $0.asString.hasPrefix("-I") }.map{ $0.asString }
4805
4806
let capFArgs = task.commandLine.filter{ $0.asString.hasPrefix("-F") }.map{ $0.asString }
4806
4807
#expect(iQuoteArgs == [
4807
- "User", "User/FooUser", "User/FooUser/Bar",
4808
- "/MissingPath", "OtherMissingPath"])
4808
+ "User", Path( "User/FooUser").str, Path( "User/FooUser/Bar").str ,
4809
+ Path( "/MissingPath").str , "OtherMissingPath"])
4809
4810
#expect(capIArgs == [
4810
- "-I\(SRCROOT)/build/Debug/include",
4811
- "-ISystem", "-ISystem/FooSystem", "-ISystem/FooSystem/Bar",
4812
- "-I\(SRCROOT)/build/aProject.build/Debug/Tool.build/DerivedSources-normal/x86_64",
4813
- "-I\(SRCROOT)/build/aProject.build/Debug/Tool.build/DerivedSources/x86_64",
4814
- "-I\(SRCROOT)/build/aProject.build/Debug/Tool.build/DerivedSources"])
4815
- #expect(capFArgs == [
4816
- "-F\(SRCROOT)/build/Debug",
4817
- "-FFramework", "-FFramework/FooFramework", "-FFramework/FooFramework/Bar"])
4811
+ "-I\(Path(SRCROOT).join("build/Debug\(buildProductsDirSuffix)/include").str)",
4812
+ "-ISystem", "-I\(Path("System/FooSystem").str)", "-I\(Path("System/FooSystem/Bar").str)",
4813
+ "-I\(Path(SRCROOT).join("build/aProject.build/Debug\(buildProductsDirSuffix)/Tool.build/DerivedSources-normal/\(results.runDestinationTargetArchitecture)").str)",
4814
+ "-I\(Path(SRCROOT).join("build/aProject.build/Debug\(buildProductsDirSuffix)/Tool.build/DerivedSources/\(results.runDestinationTargetArchitecture)").str)",
4815
+ "-I\(Path(SRCROOT).join("build/aProject.build/Debug\(buildProductsDirSuffix)/Tool.build/DerivedSources").str)"])
4816
+ if RunDestinationInfo.host == .macOS {
4817
+ #expect(capFArgs == [
4818
+ "-F\(SRCROOT)/build/Debug",
4819
+ "-FFramework", "-FFramework/FooFramework", "-FFramework/FooFramework/Bar"])
4820
+ }
4818
4821
}
4819
4822
}
4820
4823
0 commit comments