@@ -903,12 +903,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
903
903
// queries.
904
904
let dependencyOracle = InterModuleDependencyOracle ( )
905
905
let scanLibPath = try XCTUnwrap ( toolchain. lookupSwiftScanLib ( ) )
906
- guard try dependencyOracle
907
- . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
908
- swiftScanLibPath: scanLibPath) else {
909
- XCTFail ( " Dependency scanner library not found " )
910
- return
911
- }
906
+ try dependencyOracle. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
907
+ swiftScanLibPath: scanLibPath)
912
908
913
909
try withTemporaryDirectory { path in
914
910
let main = path. appending ( component: " foo.swift " )
@@ -1083,12 +1079,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
1083
1079
// 2. Run a dependency scan to find the just-built module
1084
1080
let dependencyOracle = InterModuleDependencyOracle ( )
1085
1081
let scanLibPath = try XCTUnwrap ( toolchain. lookupSwiftScanLib ( ) )
1086
- guard try dependencyOracle
1087
- . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1088
- swiftScanLibPath: scanLibPath) else {
1089
- XCTFail ( " Dependency scanner library not found " )
1090
- return
1091
- }
1082
+ try dependencyOracle. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1083
+ swiftScanLibPath: scanLibPath)
1092
1084
guard try dependencyOracle. supportsBinaryFrameworkDependencies ( ) else {
1093
1085
throw XCTSkip ( " libSwiftScan does not support framework binary dependency reporting. " )
1094
1086
}
@@ -1184,12 +1176,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
1184
1176
// queries.
1185
1177
let dependencyOracle = InterModuleDependencyOracle ( )
1186
1178
let scanLibPath = try XCTUnwrap ( toolchain. lookupSwiftScanLib ( ) )
1187
- guard try dependencyOracle
1188
- . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1189
- swiftScanLibPath: scanLibPath) else {
1190
- XCTFail ( " Dependency scanner library not found " )
1191
- return
1192
- }
1179
+ try dependencyOracle. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1180
+ swiftScanLibPath: scanLibPath)
1193
1181
1194
1182
// Create a simple test case.
1195
1183
try withTemporaryDirectory { path in
@@ -1293,12 +1281,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
1293
1281
// queries.
1294
1282
let dependencyOracle = InterModuleDependencyOracle ( )
1295
1283
let scanLibPath = try XCTUnwrap ( toolchain. lookupSwiftScanLib ( ) )
1296
- guard try dependencyOracle
1297
- . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1298
- swiftScanLibPath: scanLibPath) else {
1299
- XCTFail ( " Dependency scanner library not found " )
1300
- return
1301
- }
1284
+ try dependencyOracle. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1285
+ swiftScanLibPath: scanLibPath)
1302
1286
guard try dependencyOracle. supportsScannerDiagnostics ( ) else {
1303
1287
throw XCTSkip ( " libSwiftScan does not support diagnostics query. " )
1304
1288
}
@@ -1361,12 +1345,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
1361
1345
// queries.
1362
1346
let dependencyOracle = InterModuleDependencyOracle ( )
1363
1347
let scanLibPath = try XCTUnwrap ( toolchain. lookupSwiftScanLib ( ) )
1364
- guard try dependencyOracle
1365
- . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1366
- swiftScanLibPath: scanLibPath) else {
1367
- XCTFail ( " Dependency scanner library not found " )
1368
- return
1369
- }
1348
+ try dependencyOracle. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1349
+ swiftScanLibPath: scanLibPath)
1370
1350
1371
1351
// Create a simple test case.
1372
1352
try withTemporaryDirectory { path in
@@ -1566,12 +1546,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
1566
1546
let ( stdlibPath, shimsPath, toolchain, _) = try getDriverArtifactsForScanning ( )
1567
1547
let dependencyOracle = InterModuleDependencyOracle ( )
1568
1548
let scanLibPath = try XCTUnwrap ( toolchain. lookupSwiftScanLib ( ) )
1569
- guard try dependencyOracle
1570
- . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1571
- swiftScanLibPath: scanLibPath) else {
1572
- XCTFail ( " Dependency scanner library not found " )
1573
- return
1574
- }
1549
+ try dependencyOracle. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1550
+ swiftScanLibPath: scanLibPath)
1575
1551
// Create a simple test case.
1576
1552
try withTemporaryDirectory { path in
1577
1553
let main = path. appending ( component: " testDependencyScanning.swift " )
@@ -1668,12 +1644,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
1668
1644
let scanLibPath = try XCTUnwrap ( toolchain. lookupSwiftScanLib ( ) )
1669
1645
// Run the first scan and serialize the cache contents.
1670
1646
let firstDependencyOracle = InterModuleDependencyOracle ( )
1671
- guard try firstDependencyOracle
1672
- . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1673
- swiftScanLibPath: scanLibPath) else {
1674
- XCTFail ( " Dependency scanner library not found " )
1675
- return
1676
- }
1647
+ try firstDependencyOracle. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1648
+ swiftScanLibPath: scanLibPath)
1677
1649
1678
1650
let firstScanGraph =
1679
1651
try firstDependencyOracle. getDependencies ( workingDirectory: path,
@@ -1682,12 +1654,8 @@ final class ExplicitModuleBuildTests: XCTestCase {
1682
1654
1683
1655
// Run the second scan, re-using the serialized cache contents.
1684
1656
let secondDependencyOracle = InterModuleDependencyOracle ( )
1685
- guard try secondDependencyOracle
1686
- . verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1687
- swiftScanLibPath: scanLibPath) else {
1688
- XCTFail ( " Dependency scanner library not found " )
1689
- return
1690
- }
1657
+ try secondDependencyOracle. verifyOrCreateScannerInstance ( fileSystem: localFileSystem,
1658
+ swiftScanLibPath: scanLibPath)
1691
1659
XCTAssertFalse ( secondDependencyOracle. loadScannerCache ( from: cacheSavePath) )
1692
1660
let secondScanGraph =
1693
1661
try secondDependencyOracle. getDependencies ( workingDirectory: path,
0 commit comments