@@ -502,33 +502,34 @@ struct SwiftTestingSuiteContext: Sendable {
502502 let observer : any SwiftTestingObserverType
503503 let moduleManager : any TestModuleManager
504504 let testsCount : Int
505+ let version : String
505506
506507 init ( suite: any TestSuite & TestRunProvider ,
507- configuration: SessionConfig ,
508+ configuration: SessionConfig , version : String ,
508509 info: any SwiftTestingTestInfoType ,
509510 testsCount: Int ,
510511 observer: any SwiftTestingObserverType ,
511512 moduleManager: any TestModuleManager )
512513 {
513- self . init ( suite: suite, configuration: configuration,
514+ self . init ( suite: suite, configuration: configuration, version : version ,
514515 testsCount: testsCount, state: . init( tests: [ ] ) ,
515516 info: info, observer: observer, moduleManager: moduleManager)
516517 }
517518
518519 init ( suite: any TestSuite & TestRunProvider ,
519- configuration: SessionConfig ,
520+ configuration: SessionConfig , version : String ,
520521 tests: Set < String > ,
521522 info: any SwiftTestingTestInfoType ,
522523 observer: any SwiftTestingObserverType ,
523524 moduleManager: any TestModuleManager )
524525 {
525- self . init ( suite: suite, configuration: configuration,
526+ self . init ( suite: suite, configuration: configuration, version : version ,
526527 testsCount: tests. count, state: . init( tests: tests) ,
527528 info: info, observer: observer, moduleManager: moduleManager)
528529 }
529530
530531 private init ( suite: any TestSuite & TestRunProvider ,
531- configuration: SessionConfig ,
532+ configuration: SessionConfig , version : String ,
532533 testsCount: Int , state: State ,
533534 info: any SwiftTestingTestInfoType ,
534535 observer: any SwiftTestingObserverType ,
@@ -541,6 +542,7 @@ struct SwiftTestingSuiteContext: Sendable {
541542 self . observer = observer
542543 self . configuration = configuration
543544 self . moduleManager = moduleManager
545+ self . version = version
544546 }
545547
546548 func withTestRun< T> ( named name: String , _ action: @Sendable ( any TestRun ) async throws -> T ) async rethrows -> T {
@@ -709,19 +711,21 @@ struct SwiftTestingSuiteProvider: SwiftTestingSuiteProviderType {
709711
710712 var registry : any SwiftTestingTestRegistryType { _state. registry }
711713 var observer : any SwiftTestingObserverType { _state. observer }
714+ let version : String
712715 private let _state : State
713716
714717 init ( session: any TestSessionManager , observer: any SwiftTestingObserverType ) {
715718 self . _state = . init( session: session, observer: observer, registry: Registry ( ) )
719+ self . version = PlatformUtils . getSwiftTestingVersion ( ) ?? " unknown "
716720 }
717721
718722 func with( suite info: some SwiftTestingTestInfoType ,
719723 performing function: @Sendable ( borrowing SwiftTestingSuiteContext ) async throws -> Void ) async throws
720724 {
721725 let suite = try await self . _state. suite ( named: info. suite, in: info. module) { ( mod, manager, config) in
722726 let count = try await self . registry. count ( for: info)
723- let suite = mod. startSuite ( named: info. suite, at: nil , framework: Self . framework)
724- return . init( suite: suite, configuration: config, info: info,
727+ let suite = mod. startSuite ( named: info. suite, at: nil , framework: . init ( name : Self . framework, version : version ) )
728+ return . init( suite: suite, configuration: config, version : version , info: info,
725729 testsCount: count, observer: self . observer, moduleManager: manager)
726730 }
727731 if suite. isNew {
@@ -735,8 +739,8 @@ struct SwiftTestingSuiteProvider: SwiftTestingSuiteProviderType {
735739 {
736740 let suite = try await self . _state. suite ( named: test. suite, in: test. module) { ( mod, manager, config) in
737741 let tests = try await self . registry. tests ( for: test)
738- let suite = mod. startSuite ( named: test. suite, at: nil , framework: Self . framework)
739- return SwiftTestingSuiteContext ( suite: suite, configuration: config,
742+ let suite = mod. startSuite ( named: test. suite, at: nil , framework: . init ( name : Self . framework, version : version ) )
743+ return SwiftTestingSuiteContext ( suite: suite, configuration: config, version : version ,
740744 tests: tests, info: test, observer: self . observer,
741745 moduleManager: manager)
742746 }
@@ -770,7 +774,7 @@ struct SwiftTestingSuiteProvider: SwiftTestingSuiteProviderType {
770774}
771775
772776extension TestSuite {
773- var isSwiftTesting : Bool { testFramework == SwiftTestingSuiteProvider . framework }
777+ var isSwiftTesting : Bool { testFramework. name == SwiftTestingSuiteProvider . framework }
774778}
775779
776780extension Optional where Wrapped == SwiftTestingTestStatus . Errors {
0 commit comments