@@ -520,11 +520,12 @@ trait ParallelTesting extends RunnerOrchestration { self =>
520
520
}
521
521
522
522
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
+
525
525
def substituteClasspath (old : String ): String =
526
526
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
528
529
else o
529
530
}.mkString(JFile .pathSeparator)
530
531
@@ -535,7 +536,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
535
536
val dummyStream = new PrintStream (new ByteArrayOutputStream ())
536
537
val reporter = TestReporter .reporter(dummyStream, ERROR )
537
538
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)
539
541
val process = Runtime .getRuntime.exec(command)
540
542
val errorsText = Source .fromInputStream(process.getErrorStream).mkString
541
543
if process.waitFor() != 0 then
@@ -1419,10 +1421,10 @@ object ParallelTesting {
1419
1421
def isTastyFile (f : JFile ): Boolean =
1420
1422
f.getName.endsWith(" .tasty" )
1421
1423
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}" )
1424
1426
synchronized {
1425
- if dir.exists then
1427
+ if dir.toFile. exists then
1426
1428
dir
1427
1429
else
1428
1430
import scala .sys .process ._
0 commit comments