@@ -37,11 +37,11 @@ package actor TestSWBSession {
37
37
package nonisolated let sessionDiagnostics : [ SwiftBuildMessage . DiagnosticInfo ]
38
38
private var closed = false
39
39
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 {
41
41
self . tmpDir = try temporaryDirectory ?? NamedTemporaryDirectory ( )
42
42
// Construct the test session.
43
43
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 )
45
45
self . sessionDiagnostics = sessionDiagnostics
46
46
do {
47
47
self . session = try result. get ( )
@@ -203,8 +203,8 @@ extension SWBRunDestinationInfo: _RunDestinationInfo {
203
203
204
204
extension SWBBuildService {
205
205
/// 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 )
208
208
}
209
209
}
210
210
0 commit comments