@@ -690,13 +690,7 @@ final class WorkspaceTests: XCTestCase {
690690
691691 let packageDir = try project. uri ( for: " Package.swift " ) . fileURL!. deletingLastPathComponent ( )
692692
693- try await TSCBasic . Process. checkNonZeroExit ( arguments: [
694- ToolchainRegistry . forTesting. default!. swift!. filePath,
695- " build " ,
696- " --package-path " , packageDir. filePath,
697- " -Xswiftc " , " -index-ignore-system-modules " ,
698- " -Xcc " , " -index-ignore-system-symbols " ,
699- ] )
693+ try await SwiftPMTestProject . build ( at: packageDir)
700694
701695 let ( otherPackageUri, positions) = try project. openDocument ( " otherPackage.swift " )
702696 let testPosition = positions [ " 1️⃣ " ]
@@ -1356,13 +1350,16 @@ final class WorkspaceTests: XCTestCase {
13561350 )
13571351
13581352 let clang = try unwrap ( await ToolchainRegistry . forTesting. default? . clang)
1359- try await Process . checkNonZeroExit (
1360- arguments: [
1361- clang. filePath, " -index-store-path " , scratchDirectory. appendingPathComponent ( " index " ) . filePath,
1362- scratchDirectory. appendingPathComponent ( " test.c " ) . filePath,
1363- " -fsyntax-only " ,
1364- ]
1365- )
1353+ let clangOutput = try await withTimeout ( defaultTimeoutDuration) {
1354+ try await Process . checkNonZeroExit (
1355+ arguments: [
1356+ clang. filePath, " -index-store-path " , scratchDirectory. appendingPathComponent ( " index " ) . filePath,
1357+ scratchDirectory. appendingPathComponent ( " test.c " ) . filePath,
1358+ " -fsyntax-only " ,
1359+ ]
1360+ )
1361+ }
1362+ logger. debug ( " Clang output: \n \( clangOutput) " )
13661363
13671364 let testClient = try await TestSourceKitLSPClient (
13681365 options: . testDefault( experimentalFeatures: [ . sourceKitOptionsRequest] ) ,
0 commit comments