@@ -314,9 +314,9 @@ fileprivate extension CompatibilityTest {
314314
315315            // Build the package.
316316            let  process  =  Process ( ) 
317-             process. executableURL =  URL ( fileURLWithPath :   " /usr/bin/env " ) 
317+             process. executableURL =  try   resolveExecutable ( " swift " ) 
318318            process. arguments =  [ 
319-                 " swift " ,   " build " ,  " --package-path " ,  packageDir. path,  " -Xswiftc " ,  " -Xllvm " ,  " -Xswiftc " , 
319+                 " build " ,  " --package-path " ,  packageDir. path,  " -Xswiftc " ,  " -Xllvm " ,  " -Xswiftc " , 
320320                " -vectorize-slp=false " , 
321321            ] 
322322            if  let  numBuildJobs =  compatibilityTestNumBuildJobs { 
@@ -358,14 +358,12 @@ fileprivate extension CompatibilityTest {
358358    func  log( _ message:  String )  {  print ( " \( name)   \( message) " )  } 
359359
360360    var  testCaseName :  String  { 
361-         /// The `name` property is `<test-suite-name>. <test-case-name>` on Linux ,
362-         /// and `-[ <test-suite-name>  <test-case-name>]` on macOS .
361+         /// The `name` property is `-[ <test-suite-name>  <test-case-name>] ` on Apple platforms (e.g. with an Objective-C runtime) ,
362+         /// and `<test-suite-name>. <test-case-name>` elsewhere .
363363        #if canImport(Darwin) 
364364        return  String ( name. split ( separator:  "   " ,  maxSplits:  2 ) . last!. dropLast ( ) ) 
365-         #elseif os(Linux) 
366-         return  String ( name. split ( separator:  " . " ,  maxSplits:  2 ) . last!) 
367365        #else 
368-         #error("Platform not supported" )
366+         return   String ( name . split ( separator :   " . " ,  maxSplits :   2 ) . last! ) 
369367        #endif 
370368    } 
371369} 
@@ -417,7 +415,7 @@ fileprivate extension URLSession {
417415    func  data( from url:  URL )  async  throws  ->  ( Data ,  URLResponse )  { 
418416        #if canImport(Darwin) 
419417        return  try   await  data ( from:  url,  delegate:  nil ) 
420-         #elseif os(Linux)  
418+         #else  
421419        return  try   await  withCheckedThrowingContinuation  {  continuation in 
422420            dataTask ( with:  URLRequest ( url:  url) )  {  data,  response,  error in 
423421                if  let  error { 
@@ -432,8 +430,6 @@ fileprivate extension URLSession {
432430            } 
433431            . resume ( ) 
434432        } 
435-         #else 
436-         #error("Platform not supported") 
437433        #endif 
438434    } 
439435} 
0 commit comments