@@ -2180,20 +2180,40 @@ final class BackgroundIndexingTests: XCTestCase {
2180
2180
private let libATarget = BuildTargetIdentifier ( uri: try ! URI ( string: " build://targetA " ) )
2181
2181
private let libBTarget = BuildTargetIdentifier ( uri: try ! URI ( string: " build://targetB " ) )
2182
2182
2183
+ private func fakeOutputPath( for file: String , in target: String ) -> String {
2184
+ #if os(Windows)
2185
+ return #"C:\"# + target + #"\"# + file + " .o "
2186
+ #else
2187
+ return " / " + target + " / " + file + " .o "
2188
+ #endif
2189
+ }
2190
+
2183
2191
private var sources : [ SourcesItem ] {
2184
2192
return [
2185
2193
SourcesItem (
2186
2194
target: libATarget,
2187
2195
sources: [
2188
- sourceItem ( for: projectRoot. appendingPathComponent ( " Shared.swift " ) , outputPath: " /LibA/Shared.swift.o " ) ,
2189
- sourceItem ( for: projectRoot. appendingPathComponent ( " LibA.swift " ) , outputPath: " /LibA/LibA.swift.o " ) ,
2196
+ sourceItem (
2197
+ for: projectRoot. appendingPathComponent ( " Shared.swift " ) ,
2198
+ outputPath: fakeOutputPath ( for: " Shared.swift " , in: " LibA " )
2199
+ ) ,
2200
+ sourceItem (
2201
+ for: projectRoot. appendingPathComponent ( " LibA.swift " ) ,
2202
+ outputPath: fakeOutputPath ( for: " LibA.swift " , in: " LibA " )
2203
+ ) ,
2190
2204
]
2191
2205
) ,
2192
2206
SourcesItem (
2193
2207
target: libBTarget,
2194
2208
sources: [
2195
- sourceItem ( for: projectRoot. appendingPathComponent ( " Shared.swift " ) , outputPath: " /LibB/Shared.swift.o " ) ,
2196
- sourceItem ( for: projectRoot. appendingPathComponent ( " LibB.swift " ) , outputPath: " /LibB/LibB.swift.o " ) ,
2209
+ sourceItem (
2210
+ for: projectRoot. appendingPathComponent ( " Shared.swift " ) ,
2211
+ outputPath: fakeOutputPath ( for: " Shared.swift " , in: " LibB " )
2212
+ ) ,
2213
+ sourceItem (
2214
+ for: projectRoot. appendingPathComponent ( " LibB.swift " ) ,
2215
+ outputPath: fakeOutputPath ( for: " LibB.swift " , in: " LibB " )
2216
+ ) ,
2197
2217
]
2198
2218
) ,
2199
2219
]
0 commit comments