Skip to content

Commit 94a35ee

Browse files
committed
Only disallow only multi project separate compilation
1 parent 068c1ef commit 94a35ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,9 +1242,13 @@ trait ParallelTesting extends RunnerOrchestration { self =>
12421242

12431243
val (dirs, files) = compilationTargets(sourceDir, fileFilter)
12441244

1245+
val doSequentialSeparateCompilation = !flags.options.contains("-Ytest-pickler")
1246+
def compileDir(dir: JFile): Boolean = {
1247+
doSequentialSeparateCompilation || !dir.listFiles().exists(_.getName.endsWith(".java") || _.getName.endsWith("_2.scala"))
1248+
}
12451249
val targets =
12461250
files.map(f => JointCompilationSource(testGroup.name, Array(f), flags, createOutputDirsForFile(f, sourceDir, outDir))) ++
1247-
(if (flags.options.contains("-Ytest-pickler")) Nil else dirs.map(dir => SeparateCompilationSource(testGroup.name, dir, flags, createOutputDirsForDir(dir, sourceDir, outDir))))
1251+
dirs.collect { case dir if compileDir(dir) => SeparateCompilationSource(testGroup.name, dir, flags, createOutputDirsForDir(dir, sourceDir, outDir)) }
12481252

12491253
// Create a CompilationTest and let the user decide whether to execute a pos or a neg test
12501254
new CompilationTest(targets)

0 commit comments

Comments
 (0)