From 76492df3833a51e10d21ce52acfccc6ca4931d14 Mon Sep 17 00:00:00 2001 From: Matt Bovel Date: Tue, 7 May 2024 10:24:50 +0200 Subject: [PATCH] Run printing tests in a separate directory --- compiler/test/dotty/tools/dotc/printing/PrintingTest.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/test/dotty/tools/dotc/printing/PrintingTest.scala b/compiler/test/dotty/tools/dotc/printing/PrintingTest.scala index 382c029c86e0..8a80a6978bdb 100644 --- a/compiler/test/dotty/tools/dotc/printing/PrintingTest.scala +++ b/compiler/test/dotty/tools/dotc/printing/PrintingTest.scala @@ -6,7 +6,7 @@ import scala.language.unsafeNulls import vulpix.FileDiff import vulpix.TestConfiguration -import vulpix.TestConfiguration +import vulpix.ParallelTesting import reporting.TestReporter import java.io._ @@ -25,7 +25,9 @@ import java.io.File class PrintingTest { def options(phase: String, flags: List[String]) = - List(s"-Xprint:$phase", "-color:never", "-nowarn", "-classpath", TestConfiguration.basicClasspath) ::: flags + val outDir = ParallelTesting.defaultOutputDir + "printing" + File.pathSeparator + File(outDir).mkdirs() + List(s"-Xprint:$phase", "-color:never", "-nowarn", "-d", outDir, "-classpath", TestConfiguration.basicClasspath) ::: flags private def compileFile(path: JPath, phase: String): Boolean = { val baseFilePath = path.toString.stripSuffix(".scala")