@@ -39,8 +39,11 @@ final class MultiNodeTestPlugin: CommandPlugin {
3939 }
4040 }
4141
42+ // Find the executable dependency frome the plugin context.
43+ let tool = try context. tool ( named: " MultiNodeTestKitRunner " )
44+
4245 // Terminate all previous runners
43- Process . killall ( name: " MultiNodeTestKitRunner " )
46+ Process . killall ( name: tool . name )
4447
4548 switch self . buildConfiguration {
4649 case . debug:
@@ -71,14 +74,14 @@ final class MultiNodeTestPlugin: CommandPlugin {
7174 log ( " Detected multi-node test runner: \( multiNodeRunner. path. lastComponent) " )
7275
7376 let process = Process ( )
74- process. binaryPath = " /usr/bin/swift "
75- process. arguments = [ " run " , " MultiNodeTestKitRunner " ]
77+ process. binaryPath = tool . path . string
78+ process. arguments = [ ]
7679 for arg in arguments {
7780 process. arguments? . append ( arg)
7881 }
7982
8083 do {
81- log ( " > swift \( process. arguments? . joined ( separator: " " ) ?? " " ) " )
84+ log ( " > \( tool . name ) \( process. arguments? . joined ( separator: " " ) ?? " " ) " )
8285 try process. runProcess ( )
8386 process. waitUntilExit ( )
8487 } catch {
@@ -144,7 +147,7 @@ extension Process {
144147 static func killall( name: String ) {
145148 let killAllRunners = Process ( )
146149 killAllRunners. binaryPath = " /usr/bin/killall "
147- killAllRunners. arguments = [ " -9 " , " MultiNodeTestKitRunner " ]
150+ killAllRunners. arguments = [ " -9 " , name ]
148151 try ? killAllRunners. runProcess ( )
149152 killAllRunners. waitUntilExit ( )
150153 }
0 commit comments