Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ scalaVersion := "2.11.0-M5"
scalaBinaryVersion := "2.11.0-M5"

// don't use for doc scope, scaladoc warnings are not to be reckoned with
scalacOptions in compile ++= Seq("-optimize", "-Xfatal-warnings", "-feature", "-deprecation", "-unchecked", "-Xlint")
scalacOptions in (Compile, compile) ++= Seq("-optimize", "-Xfatal-warnings", "-feature", "-deprecation", "-unchecked", "-Xlint")


// Generate $name.properties to store our version as well as the scala version used to build
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# "0.13.+" breaks plugin resolution
sbt.version=0.13.0-RC5
sbt.version=0.13.0
2 changes: 1 addition & 1 deletion src/main/scala/scala/tools/partest/DirectTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package scala.tools.partest

import scala.tools.nsc._
import settings.ScalaVersion
import util.{ SourceFile, BatchSourceFile }
import scala.reflect.internal.util.{ SourceFile, BatchSourceFile }
import reporters.{Reporter, ConsoleReporter}
import scala.tools.cmd.CommandLineParser

Expand Down
1 change: 0 additions & 1 deletion src/main/scala/scala/tools/partest/TestState.scala
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ object TestState {
def reason = s"caught $caught_s - ${caught.getMessage}"

private def caught_s = (caught.getClass.getName split '.').last
private def stack_s = stackTraceString(caught)
override def transcriptString = nljoin(super.transcriptString, caught_s)
}
}
19 changes: 7 additions & 12 deletions src/main/scala/scala/tools/partest/nest/Runner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ import scala.collection.mutable.ListBuffer
import scala.concurrent.duration.Duration
import scala.io.Codec
import scala.reflect.internal.FatalError
import scala.reflect.internal.util.ScalaClassLoader
import scala.sys.process.{ Process, ProcessLogger }
import scala.tools.nsc.Properties.{ envOrElse, isWin, jdkHome, javaHome, propOrElse, propOrEmpty, setProp, versionMsg, javaVmName, javaVmVersion, javaVmInfo }
import scala.tools.nsc.{ Settings, CompilerCommand, Global }
import scala.tools.nsc.io.{ AbstractFile, PlainFile }
import scala.tools.nsc.io.{ AbstractFile }
import scala.tools.nsc.reporters.ConsoleReporter
import scala.tools.nsc.util.{ Exceptional, ScalaClassLoader, stackTraceString }
import scala.tools.nsc.util.{ Exceptional, stackTraceString }
import scala.tools.scalap.Main.decompileScala
import scala.tools.scalap.scalasig.ByteCode
import scala.util.{ Try, Success, Failure }
Expand Down Expand Up @@ -58,7 +59,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
def isEnumeratedTest = false

private var _lastState: TestState = null
private var _transcript = new TestTranscript
private val _transcript = new TestTranscript

def lastState = if (_lastState == null) Uninitialized(testFile) else _lastState
def setLastState(s: TestState) = _lastState = s
Expand All @@ -79,7 +80,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
type RanOneTest = (Boolean, LogContext)

def showCrashInfo(t: Throwable) {
System.err.println("Crashed running test $testIdent: " + t)
System.err.println(s"Crashed running test $testIdent: " + t)
if (!isPartestTerse)
System.err.println(stackTraceString(t))
}
Expand Down Expand Up @@ -454,13 +455,7 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {

def fsString = fs map (_.toString stripPrefix parentFile.toString + "/") mkString " "
def isOk = result.isOk
def mkScalacString(): String = {
val flags = file2String(flagsFile) match {
case "" => ""
case s => " " + s
}
s"""scalac $fsString"""
}
def mkScalacString(): String = s"""scalac $fsString"""
override def toString = description + ( if (result.isOk) "" else "\n" + result.status )
}
case class OnlyJava(fs: List[File]) extends CompileRound {
Expand Down Expand Up @@ -772,7 +767,7 @@ class SuiteRunner(
if (failed && !runner.logFile.canRead)
runner.genPass()
else {
val (state, elapsed) =
val (state, _) =
try timed(runner.run())
catch {
case t: Throwable => throw new RuntimeException(s"Error running $testFile", t)
Expand Down
6 changes: 3 additions & 3 deletions src/main/scala/scala/tools/partest/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,16 @@ package object partest {

c.Expr(Block(
List(Apply(
Select(Ident(PredefModule), newTermName("println")),
Select(Ident(PredefModule), TermName("println")),
List(Apply(
Select(Apply(
Select(Ident(ScalaPackage), newTermName("StringContext")),
Select(Ident(ScalaPackage), TermName("StringContext")),
List(
Literal(Constant("trace> ")),
Literal(Constant("\\nres: ")),
Literal(Constant(" = ")),
Literal(Constant("\\n")))),
newTermName("s")),
TermName("s")),
List(
Literal(Constant(show(a.tree))),
Literal(Constant(show(a.actualType))),
Expand Down