@@ -207,6 +207,30 @@ class CompilationTests extends ParallelTesting {
207
207
compileDir(" ../library/src" ,
208
208
allowDeepSubtypes.and(" -Ycheck-reentrant" , " -strict" , " -priorityclasspath" , defaultOutputDir))
209
209
210
+ def sources (paths : JStream [Path ], excludedFiles : List [String ] = Nil ): List [String ] =
211
+ paths.iterator().asScala
212
+ .filter(path =>
213
+ (path.toString.endsWith(" .scala" ) || path.toString.endsWith(" .java" ))
214
+ && ! excludedFiles.contains(path.getFileName.toString))
215
+ .map(_.toString).toList
216
+
217
+ val compilerDir = Paths .get(" ../compiler/src" )
218
+ val compilerSources = sources(Files .walk(compilerDir))
219
+
220
+ val backendDir = Paths .get(" ../scala-backend/src/compiler/scala/tools/nsc/backend" )
221
+ val backendJvmDir = Paths .get(" ../scala-backend/src/compiler/scala/tools/nsc/backend/jvm" )
222
+
223
+ // NOTE: Keep these exclusions synchronized with the ones in the sbt build (Build.scala)
224
+ val backendExcluded =
225
+ List (" JavaPlatform.scala" , " Platform.scala" , " ScalaPrimitives.scala" )
226
+ val backendJvmExcluded =
227
+ List (" BCodeICodeCommon.scala" , " GenASM.scala" , " GenBCode.scala" , " ScalacBackendInterface.scala" , " BackendStats.scala" , " BCodeAsmEncode.scala" )
228
+
229
+ val backendSources =
230
+ sources(Files .list(backendDir), excludedFiles = backendExcluded)
231
+ val backendJvmSources =
232
+ sources(Files .list(backendJvmDir), excludedFiles = backendJvmExcluded)
233
+
210
234
def dotty1 = {
211
235
compileList(
212
236
" dotty1" ,
@@ -339,7 +363,7 @@ class CompilationTests extends ParallelTesting {
339
363
val backendExcluded =
340
364
List (" JavaPlatform.scala" , " Platform.scala" , " ScalaPrimitives.scala" )
341
365
val backendJvmExcluded =
342
- List (" BCodeICodeCommon.scala" , " GenASM.scala" , " GenBCode.scala" , " ScalacBackendInterface.scala" )
366
+ List (" BCodeICodeCommon.scala" , " GenASM.scala" , " GenBCode.scala" , " ScalacBackendInterface.scala" , " BackendStats.scala " )
343
367
344
368
val backendSources0 =
345
369
sources(Files .list(backendDir), excludedFiles = backendExcluded)
0 commit comments