@@ -71,35 +71,40 @@ fileprivate struct SwiftTaskConstructionTests: CoreBasedTests {
7171
7272 @Test ( . requireSDKs( . macOS) )
7373 func swiftAppBasics_preSwiftOS( ) async throws {
74- try await _testSwiftAppBasics ( deploymentTargetVersion: " 10.14.0 " , shouldEmitSwiftRPath: true , shouldFilterSwiftLibs: false , shouldBackDeploySwiftConcurrency: true )
74+ try await _testSwiftAppBasics ( deploymentTargetVersion: " 10.14.0 " , shouldEmitSwiftRPath: true , shouldFilterSwiftLibs: false , shouldBackDeploySwiftConcurrency: true , shouldBackDeploySwiftSpan : true )
7575 }
7676
7777 @Test ( . requireSDKs( . macOS) )
7878 func swiftAppBasics_postSwiftOS( ) async throws {
79- try await _testSwiftAppBasics ( deploymentTargetVersion: " 12.0 " , shouldEmitSwiftRPath: false , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: false )
79+ try await _testSwiftAppBasics ( deploymentTargetVersion: " 12.0 " , shouldEmitSwiftRPath: false , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: false , shouldBackDeploySwiftSpan: true )
80+ }
81+
82+ @Test ( . requireSDKs( . macOS) )
83+ func swiftAppBasics_postSwiftSpan( ) async throws {
84+ try await _testSwiftAppBasics ( deploymentTargetVersion: " 26.0 " , shouldEmitSwiftRPath: false , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: false , shouldBackDeploySwiftSpan: false )
8085 }
8186
8287 @Test ( . requireSDKs( . macOS) )
8388 func swiftAppBasics_preSwiftOSDeploymentTarget_postSwiftOSTargetDevice( ) async throws {
84- try await _testSwiftAppBasics ( deploymentTargetVersion: " 10.14.0 " , targetDeviceOSVersion: " 11.0 " , targetDevicePlatformName: " macosx " , shouldEmitSwiftRPath: true , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: true )
89+ try await _testSwiftAppBasics ( deploymentTargetVersion: " 10.14.0 " , targetDeviceOSVersion: " 11.0 " , targetDevicePlatformName: " macosx " , shouldEmitSwiftRPath: true , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: true , shouldBackDeploySwiftSpan : true )
8590 }
8691
8792 @Test ( . requireSDKs( . macOS) )
8893 func swiftAppBasics_preSwiftOSDeploymentTarget_postSwiftOSTargetDevice_mixedPlatform( ) async throws {
89- try await _testSwiftAppBasics ( deploymentTargetVersion: " 10.14.0 " , targetDeviceOSVersion: " 14.0 " , targetDevicePlatformName: " iphoneos " , shouldEmitSwiftRPath: true , shouldFilterSwiftLibs: false , shouldBackDeploySwiftConcurrency: true )
94+ try await _testSwiftAppBasics ( deploymentTargetVersion: " 10.14.0 " , targetDeviceOSVersion: " 14.0 " , targetDevicePlatformName: " iphoneos " , shouldEmitSwiftRPath: true , shouldFilterSwiftLibs: false , shouldBackDeploySwiftConcurrency: true , shouldBackDeploySwiftSpan : true )
9095 }
9196
9297 @Test ( . requireSDKs( . macOS) )
9398 func swiftAppBasics_postSwiftOSDeploymentTarget_preSwiftConcurrencySupportedNatively( ) async throws {
94- try await _testSwiftAppBasics ( deploymentTargetVersion: " 11.0 " , shouldEmitSwiftRPath: true , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: true )
99+ try await _testSwiftAppBasics ( deploymentTargetVersion: " 11.0 " , shouldEmitSwiftRPath: true , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: true , shouldBackDeploySwiftSpan : true )
95100 }
96101
97102 @Test ( . requireSDKs( . macOS) , . userDefaults( [ " AllowRuntimeSearchPathAdditionForSwiftConcurrency " : " 0 " ] ) )
98103 func swiftAppBasics_postSwiftOSDeploymentTarget_preSwiftConcurrencySupportedNatively_DisallowRpathInjection( ) async throws {
99- try await _testSwiftAppBasics ( deploymentTargetVersion: " 11.0 " , shouldEmitSwiftRPath: false , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: true )
104+ try await _testSwiftAppBasics ( deploymentTargetVersion: " 11.0 " , shouldEmitSwiftRPath: false , shouldFilterSwiftLibs: true , shouldBackDeploySwiftConcurrency: true , shouldBackDeploySwiftSpan : true )
100105 }
101106
102- func _testSwiftAppBasics( deploymentTargetVersion: String , targetDeviceOSVersion: String ? = nil , targetDevicePlatformName: String ? = nil , toolchain toolchainIdentifier: String = " default " , shouldEmitSwiftRPath: Bool , shouldFilterSwiftLibs: Bool , shouldBackDeploySwiftConcurrency: Bool ) async throws {
107+ func _testSwiftAppBasics( deploymentTargetVersion: String , targetDeviceOSVersion: String ? = nil , targetDevicePlatformName: String ? = nil , toolchain toolchainIdentifier: String = " default " , shouldEmitSwiftRPath: Bool , shouldFilterSwiftLibs: Bool , shouldBackDeploySwiftConcurrency: Bool , shouldBackDeploySwiftSpan : Bool ) async throws {
103108 let swiftCompilerPath = try await self . swiftCompilerPath
104109 let swiftVersion = try await self . swiftVersion
105110 let swiftFeatures = try await self . swiftFeatures
@@ -412,7 +417,7 @@ fileprivate struct SwiftTaskConstructionTests: CoreBasedTests {
412417 // There should be a 'CopySwiftLibs' task.
413418 results. checkTask ( . matchTarget( target) , . matchRuleType( " CopySwiftLibs " ) ) { task -> Void in
414419 task. checkRuleInfo ( [ " CopySwiftLibs " , " \( SRCROOT) /build/Debug/AppTarget.app " ] )
415- task. checkCommandLine ( ( [ [ " builtin-swiftStdLibTool " , " --copy " , " --verbose " , " --scan-executable " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/MacOS/AppTarget " , " --scan-folder " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/Frameworks " , " --scan-folder " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/PlugIns " , " --scan-folder " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/Library/SystemExtensions " , " --scan-folder " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/Extensions " , " --scan-folder " , " \( SRCROOT) /build/Debug/FwkTarget.framework " , " --platform " , " macosx " , " --toolchain " , effectiveToolchain. path. str] , ( toolchainIdentifier == " default " ? [ ] : [ " --toolchain " , defaultToolchain. path. str] ) , [ " --destination " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/Frameworks " , " --strip-bitcode " , " --strip-bitcode-tool " , " \( effectiveToolchain. path. str) /usr/bin/bitcode_strip " , " --emit-dependency-info " , " \( SRCROOT) /build/aProject.build/Debug/AppTarget.build/SwiftStdLibToolInputDependencies.dep " ] , shouldFilterSwiftLibs ? [ " --filter-for-swift-os " ] : [ ] , shouldBackDeploySwiftConcurrency ? [ " --back-deploy-swift-concurrency " ] : [ ] ] as [ [ String ] ] ) . reduce ( [ ] , + ) )
420+ task. checkCommandLine ( ( [ [ " builtin-swiftStdLibTool " , " --copy " , " --verbose " , " --scan-executable " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/MacOS/AppTarget " , " --scan-folder " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/Frameworks " , " --scan-folder " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/PlugIns " , " --scan-folder " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/Library/SystemExtensions " , " --scan-folder " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/Extensions " , " --scan-folder " , " \( SRCROOT) /build/Debug/FwkTarget.framework " , " --platform " , " macosx " , " --toolchain " , effectiveToolchain. path. str] , ( toolchainIdentifier == " default " ? [ ] : [ " --toolchain " , defaultToolchain. path. str] ) , [ " --destination " , " \( SRCROOT) /build/Debug/AppTarget.app/Contents/Frameworks " , " --strip-bitcode " , " --strip-bitcode-tool " , " \( effectiveToolchain. path. str) /usr/bin/bitcode_strip " , " --emit-dependency-info " , " \( SRCROOT) /build/aProject.build/Debug/AppTarget.build/SwiftStdLibToolInputDependencies.dep " ] , shouldFilterSwiftLibs ? [ " --filter-for-swift-os " ] : [ ] , shouldBackDeploySwiftConcurrency ? [ " --back-deploy-swift-concurrency " ] : [ ] , shouldBackDeploySwiftSpan ? [ " --back-deploy-swift-span " ] : [ ] ] as [ [ String ] ] ) . reduce ( [ ] , + ) )
416421
417422 task. checkInputs ( [
418423 . path( " \( SRCROOT) /build/Debug/AppTarget.app/Contents/MacOS/AppTarget " ) ,
0 commit comments