File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -479,6 +479,13 @@ extension Driver {
479479 return [ ]
480480 }
481481
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+
482489 private mutating func addVerifyJobs( emitModuleJob: Job , addJob: ( Job ) -> Void )
483490 throws {
484491 // 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 {
60176017 XCTAssertEqual ( configs. count, 1 )
60186018 XCTAssertEqual ( configs [ 0 ] . key, " SkipFeature1 " )
60196019 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)
60206024 }
60216025 try withTemporaryFile { file in
60226026 try localFileSystem. writeFileContents ( file. path) {
You can’t perform that action at this time.
0 commit comments