Skip to content

Commit 629fbb3

Browse files
committed
Sync blacklisted files
1 parent a16e380 commit 629fbb3

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
@@ -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)

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)