@@ -6769,77 +6769,6 @@ final class SwiftDriverTests: XCTestCase {
67696769 XCTAssertTrue ( job. commandLine. contains ( . path( . absolute( try driver. toolchain. executableDir. parentDirectory. appending ( components: " local " , " lib " , " swift " , " host " , " plugins " ) ) ) ) )
67706770 }
67716771
6772- func testExternalPluginPaths( ) throws {
6773- #if !os(macOS)
6774- throw XCTSkip ( " Supported only in macOS " )
6775- #endif
6776-
6777- try withTemporaryDirectory { tmpDir in
6778- var driver = try Driver ( args: [ " swiftc " , " -typecheck " , " foo.swift " ] ,
6779- integratedDriver: false ,
6780- compilerExecutableDir: tmpDir)
6781- guard driver. isFrontendArgSupported ( . externalPluginPath) else {
6782- return
6783- }
6784-
6785- let jobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
6786- XCTAssertEqual ( jobs. count, 1 )
6787- let job = jobs. first!
6788-
6789- // This happens only Xcode toolchain has 'swift-plugin-server' which we
6790- // don't know.
6791- let idx1 = job. commandLine. firstIndex ( of: . flag( " -external-plugin-path " ) )
6792- try XCTSkipIf ( idx1 == nil )
6793- switch job. commandLine [ job. commandLine. index ( after: idx1!) ] {
6794- case . flag( let value) :
6795- let components = value. split ( separator: " # " )
6796- if components. count == 2 {
6797- XCTAssertTrue ( components [ 0 ] . hasSuffix ( " /usr/lib/swift/host/plugins " ) )
6798- XCTAssertTrue ( components [ 1 ] . hasSuffix ( " /usr/bin/swift-plugin-server " ) )
6799- } else {
6800- XCTFail ( " # separated count must 2 " )
6801- }
6802- default :
6803- XCTFail ( " invalid arg type after '-external-plugin-path' " )
6804- }
6805-
6806- let idx2 = job. commandLine [ job. commandLine. index ( after: idx1!) ... ] . firstIndex ( of: . flag( " -external-plugin-path " ) )
6807- switch job. commandLine [ job. commandLine. index ( after: try XCTUnwrap ( idx2) ) ] {
6808- case . flag( let value) :
6809- let components = value. split ( separator: " # " )
6810- if ( components. count == 2 ) {
6811- XCTAssertTrue ( components [ 0 ] . hasSuffix ( " /usr/local/lib/swift/host/plugins " ) )
6812- XCTAssertTrue ( components [ 1 ] . hasSuffix ( " /usr/bin/swift-plugin-server " ) )
6813- } else {
6814- XCTFail ( " # separated count must 2 " )
6815- }
6816- default :
6817- XCTFail ( " invalid arg type after '-external-plugin-path' " )
6818- }
6819- }
6820- }
6821-
6822- func testExternalPluginPathsDisabled( ) throws {
6823- #if !os(macOS)
6824- throw XCTSkip ( " Supported only in macOS " )
6825- #endif
6826-
6827- try withTemporaryDirectory { tmpDir in
6828- var driver = try Driver ( args: [ " swiftc " , " -typecheck " , " foo.swift " ] ,
6829- integratedDriver: true ,
6830- compilerExecutableDir: tmpDir)
6831- guard driver. isFrontendArgSupported ( . externalPluginPath) else {
6832- return
6833- }
6834-
6835- let jobs = try driver. planBuild ( ) . removingAutolinkExtractJobs ( )
6836- XCTAssertEqual ( jobs. count, 1 )
6837- let job = jobs. first!
6838-
6839- XCTAssertFalse ( job. commandLine. contains ( . flag( " -external-plugin-path " ) ) )
6840- }
6841- }
6842-
68436772 func testClangModuleValidateOnce( ) throws {
68446773 let flagTest = try Driver ( args: [ " swiftc " , " -typecheck " , " foo.swift " ] )
68456774 guard flagTest. isFrontendArgSupported ( . clangBuildSessionFile) ,
0 commit comments