Skip to content

Commit a7bec36

Browse files
committed
Sync blacklisted files
1 parent 55b22b1 commit a7bec36

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,30 @@ class CompilationTests extends ParallelTesting {
213213
compileDir("../library/src",
214214
allowDeepSubtypes.and("-Ycheck-reentrant", "-strict", "-priorityclasspath", defaultOutputDir))
215215

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+
216240
def dotty1 = {
217241
compileList(
218242
"dotty1",
@@ -346,7 +370,7 @@ class CompilationTests extends ParallelTesting {
346370
val backendExcluded =
347371
List("JavaPlatform.scala", "Platform.scala", "ScalaPrimitives.scala")
348372
val backendJvmExcluded =
349-
List("BCodeICodeCommon.scala", "GenASM.scala", "GenBCode.scala", "ScalacBackendInterface.scala")
373+
List("BCodeICodeCommon.scala", "GenASM.scala", "GenBCode.scala", "ScalacBackendInterface.scala", "BackendStats.scala")
350374

351375
val backendSources0 =
352376
sources(Files.list(backendDir), excludedFiles = backendExcluded)

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ object Build {
373373
val files = ((backendDir *
374374
(allScalaFiles - "JavaPlatform.scala" - "Platform.scala" - "ScalaPrimitives.scala")) +++
375375
(backendDir / "jvm") *
376-
(allScalaFiles - "BCodeICodeCommon.scala" - "GenASM.scala" - "GenBCode.scala" - "ScalacBackendInterface.scala" - "BackendStats.scala" - "BCodeAsmEncode.scala")
376+
(allScalaFiles - "BCodeICodeCommon.scala" - "GenASM.scala" - "GenBCode.scala" - "ScalacBackendInterface.scala" - "BackendStats.scala")
377377
).get
378378

379379
val pairs = files.pair(sbt.Path.rebase(submoduleCompilerDir, outputDir))

0 commit comments

Comments
 (0)