@@ -690,13 +690,7 @@ final class WorkspaceTests: XCTestCase {
690
690
691
691
let packageDir = try project. uri ( for: " Package.swift " ) . fileURL!. deletingLastPathComponent ( )
692
692
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)
700
694
701
695
let ( otherPackageUri, positions) = try project. openDocument ( " otherPackage.swift " )
702
696
let testPosition = positions [ " 1️⃣ " ]
@@ -1356,13 +1350,16 @@ final class WorkspaceTests: XCTestCase {
1356
1350
)
1357
1351
1358
1352
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) " )
1366
1363
1367
1364
let testClient = try await TestSourceKitLSPClient (
1368
1365
options: . testDefault( experimentalFeatures: [ . sourceKitOptionsRequest] ) ,
0 commit comments