File tree 2 files changed +11
-0
lines changed 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -479,6 +479,13 @@ extension Driver {
479
479
return [ ]
480
480
}
481
481
482
+ @_spi ( Testing) public static func getAllConfiguredModules( withKey: String , _ configs: [ AdopterConfig ] ) -> Set < String > {
483
+ let allModules = configs. flatMap {
484
+ return $0. key == withKey ? $0. moduleNames : [ ]
485
+ }
486
+ return Set < String > ( allModules)
487
+ }
488
+
482
489
private mutating func addVerifyJobs( emitModuleJob: Job , addJob: ( Job ) -> Void )
483
490
throws {
484
491
// Turn this flag on by default with the env var or for public frameworks.
Original file line number Diff line number Diff line change @@ -6017,6 +6017,10 @@ final class SwiftDriverTests: XCTestCase {
6017
6017
XCTAssertEqual ( configs. count, 1 )
6018
6018
XCTAssertEqual ( configs [ 0 ] . key, " SkipFeature1 " )
6019
6019
XCTAssertEqual ( configs [ 0 ] . moduleNames, [ " foo " , " bar " ] )
6020
+ let modules = Driver . getAllConfiguredModules ( withKey: " SkipFeature1 " , configs)
6021
+ XCTAssertTrue ( modules. contains ( " foo " ) )
6022
+ XCTAssertTrue ( modules. contains ( " bar " ) )
6023
+ XCTAssertTrue ( Driver . getAllConfiguredModules ( withKey: " SkipFeature2 " , configs) . isEmpty)
6020
6024
}
6021
6025
try withTemporaryFile { file in
6022
6026
try localFileSystem. writeFileContents ( file. path) {
You can’t perform that action at this time.
0 commit comments