diff options
-rw-r--r-- | compiler/test/dotty/tools/dotc/ParallelTesting.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/test/dotty/tools/dotc/ParallelTesting.scala b/compiler/test/dotty/tools/dotc/ParallelTesting.scala index eada2c763..711fc86a3 100644 --- a/compiler/test/dotty/tools/dotc/ParallelTesting.scala +++ b/compiler/test/dotty/tools/dotc/ParallelTesting.scala @@ -61,7 +61,12 @@ trait ParallelTesting { files -> reporter.errors } - def compileFilesInDir(f: String, flags: Array[String])(implicit outDir: String): Unit = { + def compileFilesInDir(f: String, flags: Array[String])(implicit outDirectory: String): Unit = { + // each calling method gets its own unique output directory, in which we + // place the dir being compiled: + val callingMethod = Thread.currentThread.getStackTrace.apply(3).getMethodName + val outDir = outDirectory + callingMethod + "/" + val dir = new JFile(f) require(f.contains("/tests"), "only allowed to run integration tests from `tests` dir using this method") require(dir.isDirectory && dir.exists, "passed non-directory to `compileFilesInDir`") |