@@ -520,11 +520,12 @@ trait ParallelTesting extends RunnerOrchestration { self =>
520520 }
521521
522522 protected def compileWithOtherCompiler (compiler : String , files : Array [JFile ], flags : TestFlags , targetDir : JFile ): TestReporter =
523- val compilerDir = getCompiler(compiler).toString
524-
523+ val compilerDir = getCompiler(compiler)
524+
525525 def substituteClasspath (old : String ): String =
526526 old.split(JFile .pathSeparator).map { o =>
527- if JFile (o) == JFile (Properties .dottyLibrary) then s " $compilerDir/lib/scala3-library_3- $compiler.jar "
527+ if JFile (o) == JFile (Properties .dottyLibrary) then
528+ compilerDir.resolve(" lib" ).resolve(s " scala3-library_3- $compiler.jar " ).toString
528529 else o
529530 }.mkString(JFile .pathSeparator)
530531
@@ -535,7 +536,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
535536 val dummyStream = new PrintStream (new ByteArrayOutputStream ())
536537 val reporter = TestReporter .reporter(dummyStream, ERROR )
537538
538- val command = Array (compilerDir + " /bin/scalac" ) ++ flags1.all ++ files.map(_.getPath)
539+ val scalacPath = compilerDir.resolve(" bin" ).resolve(" scalac" ).toString
540+ val command = Array (scalacPath) ++ flags1.all ++ files.map(_.getPath)
539541 val process = Runtime .getRuntime.exec(command)
540542 val errorsText = Source .fromInputStream(process.getErrorStream).mkString
541543 if process.waitFor() != 0 then
@@ -1419,10 +1421,10 @@ object ParallelTesting {
14191421 def isTastyFile (f : JFile ): Boolean =
14201422 f.getName.endsWith(" .tasty" )
14211423
1422- def getCompiler (version : String ): JFile =
1423- val dir = cache.resolve(s " scala3- ${version}" ).toFile
1424+ def getCompiler (version : String ): Path =
1425+ val dir = cache.resolve(s " scala3- ${version}" )
14241426 synchronized {
1425- if dir.exists then
1427+ if dir.toFile. exists then
14261428 dir
14271429 else
14281430 import scala .sys .process ._
0 commit comments