Skip to content

Commit b8fddaf

Browse files
authored
Merge pull request #5923 from dotty-staging/full-bootstrap
Full bootstrap: Use Dotty as the reference compiler
2 parents d39bca0 + ee7cc53 commit b8fddaf

File tree

361 files changed

+88
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

361 files changed

+88
-74
lines changed

.drone.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ pipeline:
5252
# sbt scripted tests are slow and only run on nightly or deployment
5353
event: [ tag, deployment ]
5454

55+
test_scala212:
56+
group: test
57+
image: lampepfl/dotty:2019-02-06
58+
commands:
59+
- cp -R . /tmp/5/ && cd /tmp/5/
60+
- ./project/scripts/sbt ";++2.12.8 ;compile ;test"
61+
5562
# DOCUMENTATION:
5663
documentation:
5764
image: lampepfl/dotty:2019-02-06

compiler/test/dotty/tools/TestSources.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ object TestSources {
6565
.map(_.toString)
6666
.toList
6767

68-
assert(sources.nonEmpty)
6968
sources
7069
}
7170
finally files.close()

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
2929

3030
// Positive tests ------------------------------------------------------------
3131

32+
@Test def posMacros: Unit = {
33+
implicit val testGroup: TestGroup = TestGroup("compilePosMacros")
34+
compileFilesInDir("tests/pos-macros", defaultOptions)
35+
}.checkCompile()
36+
3237
@Test def posWithCompiler: Unit = {
3338
implicit val testGroup: TestGroup = TestGroup("compilePosWithCompiler")
3439
compileFilesInDir("tests/pos-with-compiler", withCompilerOptions) +
@@ -69,13 +74,23 @@ class BootstrappedOnlyCompilationTests extends ParallelTesting {
6974

7075
// Negative tests ------------------------------------------------------------
7176

72-
@Test def negAll: Unit = {
77+
@Test def negMacros: Unit = {
78+
implicit val testGroup: TestGroup = TestGroup("compileNegWithCompiler")
79+
compileFilesInDir("tests/neg-macros", defaultOptions)
80+
}.checkExpectedErrors()
81+
82+
@Test def negWithCompiler: Unit = {
7383
implicit val testGroup: TestGroup = TestGroup("compileNegWithCompiler")
7484
compileFilesInDir("tests/neg-with-compiler", withCompilerOptions)
7585
}.checkExpectedErrors()
7686

7787
// Run tests -----------------------------------------------------------------
7888

89+
@Test def runMacros: Unit = {
90+
implicit val testGroup: TestGroup = TestGroup("runMacros")
91+
compileFilesInDir("tests/run-macros", defaultOptions)
92+
}.checkRuns()
93+
7994
@Test def runWithCompiler: Unit = {
8095
implicit val testGroup: TestGroup = TestGroup("runWithCompiler")
8196
compileFilesInDir("tests/run-with-compiler", withCompilerOptions) +

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class CompilationTests extends ParallelTesting {
232232
Array("-Ycheck-reentrant", "-Yemit-tasty-in-class")
233233
)
234234

235-
val libraryDirs = List(Paths.get("library/src"), Paths.get("library/src-bootstrapped"))
235+
val libraryDirs = List(Paths.get("library/src"), Paths.get("library/src-3.x"), Paths.get("library/src-bootstrapped"))
236236
val librarySources = libraryDirs.flatMap(sources(_))
237237

238238
val lib =

compiler/test/dotty/tools/repl/ScriptedTests.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
package dotty.tools
1+
package dotty
2+
package tools
23
package repl
34

45
import java.io.{File => JFile}
56
import java.lang.System.{lineSeparator => EOL}
67

78
import org.junit.Assert._
89
import org.junit.Test
10+
import org.junit.experimental.categories.Category
911

1012
import scala.collection.mutable.ArrayBuffer
1113
import scala.io.Source
@@ -91,4 +93,7 @@ class ScriptedTests extends ReplTest with MessageRendering {
9193
@Test def replTests = scripts("/repl").foreach(testFile)
9294

9395
@Test def typePrinterTests = scripts("/type-printer").foreach(testFile)
96+
97+
@Category(Array(classOf[BootstrappedOnlyTests]))
98+
@Test def replMacrosTests = scripts("/repl-macros").foreach(testFile)
9499
}

0 commit comments

Comments
 (0)