File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,11 @@ public struct BuildParameters: Encodable {
327327 let base = " \( product. name) .xctest "
328328 return try RelativePath ( validating: " \( base) /Contents/MacOS/ \( product. name) " )
329329 } else {
330- let base = " \( product. name) -test-runner "
330+ var base = " \( product. name) -test-runner "
331+ let ext = self . triple. executableExtension
332+ if !ext. isEmpty {
333+ base += " . \( ext) "
334+ }
331335 return try RelativePath ( validating: base)
332336 }
333337 }
Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ public struct BuiltTestProduct: Codable {
2828 /// When the test product is not bundled (for instance, when using XCTest on
2929 /// non-Darwin targets), this path is equal to ``binaryPath``.
3030 public var bundlePath : AbsolutePath {
31+ // If the binary path is a test runner binary, return it as-is.
32+ guard !binaryPath. basenameWithoutExt. hasSuffix ( " test-runner " ) else {
33+ return binaryPath
34+ }
3135 // Go up the folder hierarchy until we find the .xctest bundle.
3236 let pathExtension = " .xctest "
3337 let hierarchySequence = sequence ( first: binaryPath, next: { $0. isRoot ? nil : $0. parentDirectory } )
You can’t perform that action at this time.
0 commit comments