aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/CompilationTests.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-04-11 12:17:30 +0200
committerFelix Mulder <felix.mulder@gmail.com>2017-04-12 11:48:32 +0200
commitbcdacee46f04f5bca4732bd487d3cc3c042e23db (patch)
tree69d3de19f61d91df9fb00cc9b86eed5da347a098 /compiler/test/dotty/tools/dotc/CompilationTests.scala
parentf891b224228f7c4939d09ac1849ad562d1298640 (diff)
downloaddotty-bcdacee46f04f5bca4732bd487d3cc3c042e23db.tar.gz
dotty-bcdacee46f04f5bca4732bd487d3cc3c042e23db.tar.bz2
dotty-bcdacee46f04f5bca4732bd487d3cc3c042e23db.zip
Remove need for java written summary reporter
Diffstat (limited to 'compiler/test/dotty/tools/dotc/CompilationTests.scala')
-rw-r--r--compiler/test/dotty/tools/dotc/CompilationTests.scala70
1 files changed, 6 insertions, 64 deletions
diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala
index ab7dda850..023a87069 100644
--- a/compiler/test/dotty/tools/dotc/CompilationTests.scala
+++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala
@@ -2,14 +2,15 @@ package dotty
package tools
package dotc
-import org.junit.Test
+import org.junit.{ Test, BeforeClass, AfterClass }
import scala.util.matching.Regex
import scala.concurrent.duration._
-import vulpix.{ ParallelTesting, SummaryReport }
+import vulpix.{ ParallelTesting, SummaryReport, SummaryReporting, TestConfiguration }
-class CompilationTests extends SummaryReport with ParallelTesting {
+class CompilationTests extends ParallelTesting {
+ import TestConfiguration._
import CompilationTests._
// Test suite configuration --------------------------------------------------
@@ -252,65 +253,6 @@ class CompilationTests extends SummaryReport with ParallelTesting {
}
object CompilationTests {
- implicit val defaultOutputDir: String = "../out/"
-
- implicit class RichStringArray(val xs: Array[String]) extends AnyVal {
- def and(args: String*): Array[String] = {
- val argsArr: Array[String] = args.toArray
- xs ++ argsArr
- }
- }
-
- val noCheckOptions = Array(
- "-pagewidth", "120",
- "-color:never"
- )
-
- val checkOptions = Array(
- "-Yno-deep-subtypes",
- "-Yno-double-bindings",
- "-Yforce-sbt-phases"
- )
-
- val classPath = {
- val paths = Jars.dottyTestDeps map { p =>
- val file = new java.io.File(p)
- assert(
- file.exists,
- s"""|File "$p" couldn't be found. Run `packageAll` from build tool before
- |testing.
- |
- |If running without sbt, test paths need to be setup environment variables:
- |
- | - DOTTY_LIBRARY
- | - DOTTY_COMPILER
- | - DOTTY_INTERFACES
- | - DOTTY_EXTRAS
- |
- |Where these all contain locations, except extras which is a colon
- |separated list of jars.
- |
- |When compiling with eclipse, you need the sbt-interfaces jar, put
- |it in extras."""
- )
- file.getAbsolutePath
- } mkString (":")
-
- Array("-classpath", paths)
- }
-
- private val yCheckOptions = Array("-Ycheck:tailrec,resolveSuper,mixin,restoreScopes,labelDef")
-
- val defaultOptions = noCheckOptions ++ checkOptions ++ yCheckOptions ++ classPath
- val allowDeepSubtypes = defaultOptions diff Array("-Yno-deep-subtypes")
- val allowDoubleBindings = defaultOptions diff Array("-Yno-double-bindings")
- val picklingOptions = defaultOptions ++ Array(
- "-Xprint-types",
- "-Ytest-pickler",
- "-Ystop-after:pickler",
- "-Yprintpos"
- )
- val scala2Mode = defaultOptions ++ Array("-language:Scala2")
- val explicitUTF8 = defaultOptions ++ Array("-encoding", "UTF8")
- val explicitUTF16 = defaultOptions ++ Array("-encoding", "UTF16")
+ implicit val summaryReport: SummaryReporting = new SummaryReport
+ @AfterClass def cleanup(): Unit = summaryReport.echoSummary()
}