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