aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/CompilationTests.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-03-20 15:44:46 +0100
committerFelix Mulder <felix.mulder@gmail.com>2017-03-29 10:33:25 +0200
commit8c02da6858615dacfbcc09c2431e0945fce6d730 (patch)
tree5a58872b3f9891baf2c0656fe8036021013ef2e0 /compiler/test/dotty/tools/dotc/CompilationTests.scala
parent0df3f618b2540ec0c87d16ef911f2f77bbe1b327 (diff)
downloaddotty-8c02da6858615dacfbcc09c2431e0945fce6d730.tar.gz
dotty-8c02da6858615dacfbcc09c2431e0945fce6d730.tar.bz2
dotty-8c02da6858615dacfbcc09c2431e0945fce6d730.zip
Fix tasty bootstrap
Diffstat (limited to 'compiler/test/dotty/tools/dotc/CompilationTests.scala')
-rw-r--r--compiler/test/dotty/tools/dotc/CompilationTests.scala47
1 files changed, 33 insertions, 14 deletions
diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala
index 6ce5fe95a..e7ecd342a 100644
--- a/compiler/test/dotty/tools/dotc/CompilationTests.scala
+++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala
@@ -197,23 +197,42 @@ class CompilationTests extends ParallelTesting {
* version of Dotty
*/
@Test def tastyBootstrap: Unit = {
- def dotty1 =
- compileDir("../compiler/src/dotty", allowDeepSubtypes.and("-Ycheck-reentrant", "-strict"))
- def lib =
- compileDir("../library/src", defaultOptions)
- def dotty2 =
- compileDir("../compiler/src/dotty", defaultOptions.and("-priorityclasspath", defaultOutputDir))
+ val opt = Array(
+ "-classpath",
+ // compile with bootstrapped library on cp:
+ defaultOutputDir + "lib$1/src/:" +
+ // as well as bootstrapped compiler:
+ defaultOutputDir + "dotty1$1/dotty/:" +
+ Jars.dottyInterfaces
+ )
- List(dotty1, lib, dotty2).map(_.keepOutput.pos).foreach(_.delete())
- }
+ def lib =
+ compileDir("../library/src",
+ allowDeepSubtypes.and("-Ycheck-reentrant", "-strict", "-priorityclasspath", defaultOutputDir))
- @Test def dotty = {
- def bootedLib =
- compileDir("../library/src", allowDeepSubtypes.and("-Ycheck-reentrant", "-strict"))
- def dottyDependsOnBootedLib =
- compileDir("../compiler/src/dotty", allowDeepSubtypes.and("-Ycheck-reentrant", "-strict"))
+ def dotty1 =
+ compileDir("../compiler/src/dotty", opt)
- List(bootedLib, dottyDependsOnBootedLib).map(_.keepOutput.pos).foreach(_.delete())
+ def dotty2 =
+ compileShallowFilesInDir("../compiler/src/dotty", opt)
+
+ {
+ lib.keepOutput :: dotty1.keepOutput :: {
+ dotty2 +
+ compileShallowFilesInDir("../compiler/src/dotty/tools", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/ast", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/config", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/parsing", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/printing", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/repl", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/reporting", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/rewrite", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/transform", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/typer", opt) +
+ compileShallowFilesInDir("../compiler/src/dotty/tools/dotc/util", opt)
+ } :: Nil
+ }.map(_.pos()).foreach(_.delete())
}
}