@@ -214,6 +214,30 @@ class CompilationTests extends ParallelTesting {
214214 compileDir(" ../library/src" ,
215215 allowDeepSubtypes.and(" -Ycheck-reentrant" , " -strict" , " -priorityclasspath" , defaultOutputDir))
216216
217+ def sources (paths : JStream [Path ], excludedFiles : List [String ] = Nil ): List [String ] =
218+ paths.iterator().asScala
219+ .filter(path =>
220+ (path.toString.endsWith(" .scala" ) || path.toString.endsWith(" .java" ))
221+ && ! excludedFiles.contains(path.getFileName.toString))
222+ .map(_.toString).toList
223+
224+ val compilerDir = Paths .get(" ../compiler/src" )
225+ val compilerSources = sources(Files .walk(compilerDir))
226+
227+ val backendDir = Paths .get(" ../scala-backend/src/compiler/scala/tools/nsc/backend" )
228+ val backendJvmDir = Paths .get(" ../scala-backend/src/compiler/scala/tools/nsc/backend/jvm" )
229+
230+ // NOTE: Keep these exclusions synchronized with the ones in the sbt build (Build.scala)
231+ val backendExcluded =
232+ List (" JavaPlatform.scala" , " Platform.scala" , " ScalaPrimitives.scala" )
233+ val backendJvmExcluded =
234+ List (" BCodeICodeCommon.scala" , " GenASM.scala" , " GenBCode.scala" , " ScalacBackendInterface.scala" , " BackendStats.scala" , " BCodeAsmEncode.scala" )
235+
236+ val backendSources =
237+ sources(Files .list(backendDir), excludedFiles = backendExcluded)
238+ val backendJvmSources =
239+ sources(Files .list(backendJvmDir), excludedFiles = backendJvmExcluded)
240+
217241 def dotty1 = {
218242 compileList(
219243 " dotty1" ,
@@ -349,7 +373,7 @@ class CompilationTests extends ParallelTesting {
349373 val backendExcluded =
350374 List (" JavaPlatform.scala" , " Platform.scala" , " ScalaPrimitives.scala" )
351375 val backendJvmExcluded =
352- List (" BCodeICodeCommon.scala" , " GenASM.scala" , " GenBCode.scala" , " ScalacBackendInterface.scala" )
376+ List (" BCodeICodeCommon.scala" , " GenASM.scala" , " GenBCode.scala" , " ScalacBackendInterface.scala" , " BackendStats.scala " )
353377
354378 val backendSources0 =
355379 sources(Files .list(backendDir), excludedFiles = backendExcluded)
0 commit comments