summaryrefslogtreecommitdiff
path: root/src/partest/scala/tools/partest/TestState.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-07-19 17:33:17 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-08-20 16:16:02 -0700
commit473a1692abf4d64e5df81cd19be214fe5bfa06ec (patch)
treec5f26f42296e3e585fe211b5a4e93f7c45d3b543 /src/partest/scala/tools/partest/TestState.scala
parent738441cf58136bd4af9985886dd0cd38ccda0777 (diff)
downloadscala-473a1692abf4d64e5df81cd19be214fe5bfa06ec.tar.gz
scala-473a1692abf4d64e5df81cd19be214fe5bfa06ec.tar.bz2
scala-473a1692abf4d64e5df81cd19be214fe5bfa06ec.zip
Move partest to https://github.com/scala/scala-partest
As partest is now resolved from maven, `test/partest` uses `ant test.suite.init` to determine the classpath (serialized to build/pack/partest.properties) that's necessary to run `scala.tools.partest.nest.ConsoleRunner`. Thus, partest gets exactly the same classpath, whether run from the command line through `test/partest` or via `ant test`. The version of partest we're using is specified by properties defined in versions.properties (formerly `starr.number`). Currently, we're using: ``` scala.binary.version=2.11.0-M4 partest.version.number=1.0-RC3 ``` NOTES: - The version of Scala being tested must be backwards binary compatible with the version of Scala that was used to compile partest. - Once 2.11 goes final, `scala.binary.version=2.11`, and `starr.version=2.11.0`. - Need scalacheck on classpath for test/partest scalacheck tests. - Removed atrophied ant tests (haven't been run/changed for at least two years I checked 81d659141a as a "random" sample). - Removed scalacheck. It's resolved as a partest dependency. - For now, use a locally built scalap - Kept the trace macro in the main repo (partest-extras) - New targets for faster pr validation: test-core-opt, test-stab-opt - Reused partest eclipse/intellij project to partest-extras (note: the partest dependency is hard-coded)
Diffstat (limited to 'src/partest/scala/tools/partest/TestState.scala')
-rw-r--r--src/partest/scala/tools/partest/TestState.scala64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/partest/scala/tools/partest/TestState.scala b/src/partest/scala/tools/partest/TestState.scala
deleted file mode 100644
index e58b479e54..0000000000
--- a/src/partest/scala/tools/partest/TestState.scala
+++ /dev/null
@@ -1,64 +0,0 @@
-package scala.tools.partest
-
-import scala.tools.nsc.FatalError
-import scala.tools.nsc.util.stackTraceString
-
-sealed abstract class TestState {
- def testFile: File
- def what: String
- def reason: String
- def transcript: List[String]
-
- def isOk = false
- def isSkipped = false
- def testIdent = testFile.testIdent
- def transcriptString = transcript mkString EOL
-
- def identAndReason = testIdent + reasonString
- def status = s"$what - $identAndReason"
- def longStatus = status + transcriptString
- def reasonString = if (reason == "") "" else s" [$reason]"
-
- def shortStatus = if (isOk) "ok" else "!!"
-
- override def toString = status
-}
-
-object TestState {
- case class Uninitialized(testFile: File) extends TestState {
- def what = "uninitialized"
- def reason = what
- def transcript = Nil
- override def shortStatus = "??"
- }
- case class Pass(testFile: File) extends TestState {
- def what = "pass"
- override def isOk = true
- def transcript: List[String] = Nil
- def reason = ""
- }
- case class Updated(testFile: File) extends TestState {
- def what = "updated"
- override def isOk = true
- def transcript: List[String] = Nil
- def reason = "updated check file"
- override def shortStatus = "++"
- }
- case class Skip(testFile: File, reason: String) extends TestState {
- def what = "skip"
- override def isOk = true
- override def isSkipped = true
- def transcript: List[String] = Nil
- override def shortStatus = "--"
- }
- case class Fail(testFile: File, reason: String, transcript: List[String]) extends TestState {
- def what = "fail"
- }
- case class Crash(testFile: File, caught: Throwable, transcript: List[String]) extends TestState {
- def what = "crash"
- def reason = s"caught $caught_s - ${caught.getMessage}"
-
- private def caught_s = (caught.getClass.getName split '.').last
- override def transcriptString = nljoin(super.transcriptString, caught_s)
- }
-}