@@ -37,11 +37,11 @@ package actor TestSWBSession {
3737 package nonisolated let sessionDiagnostics : [ SwiftBuildMessage . DiagnosticInfo ]
3838 private var closed = false
3939
40- package init ( connectionMode: SWBBuildServiceConnectionMode = . default, variant: SWBBuildServiceVariant = . default, temporaryDirectory: NamedTemporaryDirectory ? ) async throws {
40+ package init ( connectionMode: SWBBuildServiceConnectionMode = . default, variant: SWBBuildServiceVariant = . default, temporaryDirectory: NamedTemporaryDirectory ? , environment : [ String : String ] = [ : ] ) async throws {
4141 self . tmpDir = try temporaryDirectory ?? NamedTemporaryDirectory ( )
4242 // Construct the test session.
4343 self . service = try await SWBBuildService ( connectionMode: connectionMode, variant: variant)
44- let ( result, sessionDiagnostics) = await service. createSession ( name: #function, cachePath: tmpDir. path. str)
44+ let ( result, sessionDiagnostics) = await service. createSession ( name: #function, cachePath: tmpDir. path. str, environment : environment )
4545 self . sessionDiagnostics = sessionDiagnostics
4646 do {
4747 self . session = try result. get ( )
@@ -203,8 +203,8 @@ extension SWBRunDestinationInfo: _RunDestinationInfo {
203203
204204extension SWBBuildService {
205205 /// Overload of `createSession` which supplies an inferior products path.
206- package func createSession( name: String , developerPath: String ? = nil , cachePath: String ? ) async -> ( Result < SWBBuildServiceSession , any Error > , [ SwiftBuildMessage . DiagnosticInfo ] ) {
207- return await createSession ( name: name, developerPath: developerPath, cachePath: cachePath, inferiorProductsPath: Core . inferiorProductsPath ( ) ? . str, environment: [ : ] )
206+ package func createSession( name: String , developerPath: String ? = nil , cachePath: String ? , environment : [ String : String ] = [ : ] ) async -> ( Result < SWBBuildServiceSession , any Error > , [ SwiftBuildMessage . DiagnosticInfo ] ) {
207+ return await createSession ( name: name, developerPath: developerPath, cachePath: cachePath, inferiorProductsPath: Core . inferiorProductsPath ( ) ? . str, environment: environment )
208208 }
209209}
210210
0 commit comments