@@ -108,6 +108,12 @@ class BuildCommandTestCases: CommandsBuildProviderTestCase {
108
108
XCTAssertMatch ( stdout, . contains( " SEE ALSO: swift run, swift package, swift test " ) )
109
109
}
110
110
111
+ func testCommandDoesNotEmitDuplicateSymbols( ) async throws {
112
+ let ( stdout, stderr) = try await SwiftPM . Build. execute ( [ " --help " ] )
113
+ XCTAssertNoMatch ( stdout, duplicateSymbolRegex)
114
+ XCTAssertNoMatch ( stderr, duplicateSymbolRegex)
115
+ }
116
+
111
117
func testVersion( ) async throws {
112
118
let stdout = try await execute ( [ " --version " ] ) . stdout
113
119
XCTAssertMatch ( stdout, . regex( #"Swift Package Manager -( \w+ )?\d+.\d+.\d+(-\w+)?"# ) )
@@ -202,12 +208,15 @@ class BuildCommandTestCases: CommandsBuildProviderTestCase {
202
208
)
203
209
204
210
guard buildSystemProvider == . xcode || buildSystemProvider == . swiftbuild else {
211
+ // The remainder of this test only applies to XCBuild or Swift Build
205
212
return
206
213
}
207
214
208
215
// Print correct path when building with XCBuild or Swift Build
209
- let xcodeDebugOutput = try await execute ( [ " --show-bin-path " ] , packagePath: fullPath)
210
- . stdout
216
+ let xcodeDebugOutput = try await execute (
217
+ [ " -c " , " debug " , " --show-bin-path " ] ,
218
+ packagePath: fullPath)
219
+ . stdout
211
220
let xcodeReleaseOutput = try await execute (
212
221
[ " -c " , " release " , " --show-bin-path " ] ,
213
222
packagePath: fullPath
0 commit comments