diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-06-01 02:35:00 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-27 19:28:36 +0200 |
commit | 855bdcc5210402fbb87ce10fe7da3f532fa3049f (patch) | |
tree | b9be95db4eb65189652086281d89931df2cfcded /test/dotty/partest/DPConsoleRunner.scala | |
parent | b6882d6402bfc290a1fe589425d6dc4ff16976a8 (diff) | |
download | dotty-855bdcc5210402fbb87ce10fe7da3f532fa3049f.tar.gz dotty-855bdcc5210402fbb87ce10fe7da3f532fa3049f.tar.bz2 dotty-855bdcc5210402fbb87ce10fe7da3f532fa3049f.zip |
partest: Enable separate compilation and javac tests
partest can separately compile files based on their suffix (_1, _2,
...), it turns out that this feature was never enabled in the dotty
version of partest and no one noticed (it prints warnings in
./tests/partest-generated/gen.log which no one reads), tests with *.java
files should be compiled both with javac and dotty, but compiling with
javac was also disabled.
Enabling this revealed some latent bugs that will be fixed in the next
few commits.
Diffstat (limited to 'test/dotty/partest/DPConsoleRunner.scala')
-rw-r--r-- | test/dotty/partest/DPConsoleRunner.scala | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/test/dotty/partest/DPConsoleRunner.scala b/test/dotty/partest/DPConsoleRunner.scala index baa62579c..c939e6704 100644 --- a/test/dotty/partest/DPConsoleRunner.scala +++ b/test/dotty/partest/DPConsoleRunner.scala @@ -245,32 +245,6 @@ class DPTestRunner(testFile: File, suiteRunner: DPSuiteRunner) extends nest.Runn } getOrElse true } - // override because Dotty currently doesn't handle separate compilation well, - // so we ignore groups (tests suffixed with _1 and _2) - override def groupedFiles(sources: List[File]): List[List[File]] = { - val grouped = sources groupBy (_.group) - val flatGroup = List(grouped.keys.toList.sorted.map({ k => grouped(k) sortBy (_.getName) }).flatten) - try { // try/catch because of bug in partest that throws exception - if (flatGroup != super.groupedFiles(sources)) - throw new java.lang.UnsupportedOperationException() - } catch { - case e: java.lang.UnsupportedOperationException => - val genlogFWriter = new FileWriter(DPConfig.genLog.jfile, true) - val genlogWriter = new PrintWriter(genlogFWriter, true) - genlogWriter.println("Warning: Overriding compilation groups for tests: " + sources) - genlogWriter.close - genlogFWriter.close - } - flatGroup - } - - // override to avoid separate compilation of scala and java sources - override def mixedCompileGroup(allFiles: List[File]): List[CompileRound] = List(OnlyDotty(allFiles)) - case class OnlyDotty(fs: List[File]) extends CompileRound { - def description = s"dotc $fsString" - lazy val result = { pushTranscript(description) ; attemptCompile(fs) } - } - // override to add dotty and scala jars to classpath override def extraClasspath = suiteRunner.fileManager.asInstanceOf[DottyFileManager].extraJarList ::: super.extraClasspath |