Skip to content

Commit f59dcee

Browse files
committed
Add platform name to Debug output folder
1 parent 4f7a2b8 commit f59dcee

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Tests/CommandsTests/BuildCommandTests.swift

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,25 +1127,30 @@ struct BuildCommandTestCases {
11271127

11281128
private static func buildSystemAndOutputLocation() throws -> [(BuildSystemProvider.Kind, Basics.RelativePath)] {
11291129
return try SupportedBuildSystemOnPlatform.map { buildSystem in
1130+
let triple = try UserToolchain.default.targetTriple.withoutVersion()
1131+
let debugFolder = triple.platformName() == "macosx" ? "Debug" : "Debug-\(triple.platformName() ?? "unknown")"
11301132
switch buildSystem {
11311133
case .xcode:
11321134
return (
11331135
.xcode,
11341136
try RelativePath(validating: ".build")
11351137
.appending("apple")
11361138
.appending("Products")
1137-
.appending("Debug")
1138-
.appending("ExecutableNew")
1139+
.appending(debugFolder)
1140+
.appending("ExecutableNew.swiftmodule")
1141+
.appending("Project")
1142+
.appending("\(triple).swiftsourceinfo")
11391143
)
11401144
case .swiftbuild:
1141-
let triple = try UserToolchain.default.targetTriple.withoutVersion().tripleString
11421145
return (
11431146
.swiftbuild,
11441147
try RelativePath(validating: ".build")
1145-
.appending(triple)
1148+
.appending(triple.tripleString)
11461149
.appending("Products")
1147-
.appending("Debug")
1148-
.appending("ExecutableNew")
1150+
.appending(debugFolder)
1151+
.appending("ExecutableNew.swiftmodule")
1152+
.appending("Project")
1153+
.appending("\(triple).swiftsourceinfo")
11491154
)
11501155
case .native:
11511156
return (

0 commit comments

Comments
 (0)