diff options
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/BytecodeTest.scala | 2 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/TestState.scala | 1 | ||||
-rw-r--r-- | src/partest/scala/tools/partest/nest/Runner.scala | 16 |
3 files changed, 5 insertions, 14 deletions
diff --git a/src/partest/scala/tools/partest/BytecodeTest.scala b/src/partest/scala/tools/partest/BytecodeTest.scala index 172fa29189..2690b784d1 100644 --- a/src/partest/scala/tools/partest/BytecodeTest.scala +++ b/src/partest/scala/tools/partest/BytecodeTest.scala @@ -55,7 +55,7 @@ abstract class BytecodeTest extends ASMConverters { val name2 = clazzB.name if (ms1.length != ms2.length) { - println("Different member counts in $name1 and $name2") + println(s"Different member counts in $name1 and $name2") false } else (ms1, ms2).zipped forall { (m1, m2) => diff --git a/src/partest/scala/tools/partest/TestState.scala b/src/partest/scala/tools/partest/TestState.scala index dbe8a222a5..e58b479e54 100644 --- a/src/partest/scala/tools/partest/TestState.scala +++ b/src/partest/scala/tools/partest/TestState.scala @@ -59,7 +59,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) } } diff --git a/src/partest/scala/tools/partest/nest/Runner.scala b/src/partest/scala/tools/partest/nest/Runner.scala index 1d41095fce..6b09aa4689 100644 --- a/src/partest/scala/tools/partest/nest/Runner.scala +++ b/src/partest/scala/tools/partest/nest/Runner.scala @@ -17,7 +17,6 @@ import scala.reflect.internal.FatalError import scala.sys.process.{ Process, ProcessLogger } import scala.tools.nsc.Properties.{ envOrElse, isWin, jdkHome, javaHome, propOrElse, propOrEmpty, setProp } import scala.tools.nsc.{ Settings, CompilerCommand, Global } -import scala.tools.nsc.io.{ AbstractFile, PlainFile } import scala.tools.nsc.reporters.ConsoleReporter import scala.tools.nsc.util.{ Exceptional, ScalaClassLoader, stackTraceString } import scala.tools.scalap.Main.decompileScala @@ -86,7 +85,7 @@ class Runner(val testFile: File, fileManager: FileManager, val testRunParams: Te 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)) } @@ -490,13 +489,7 @@ class Runner(val testFile: File, fileManager: FileManager, val testRunParams: Te 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 { @@ -770,7 +763,7 @@ trait DirectRunner { import PartestDefaults.{ numThreads, waitTime } setUncaughtHandler - + def runTestsForFiles(kindFiles: List[File], kind: String): List[TestState] = { NestUI.resetTestNumber(kindFiles.size) @@ -866,7 +859,6 @@ object Output { /** Use a Runner to run a test. */ class RunnerManager(kind: String, fileManager: FileManager, params: TestRunParams) { - import fileManager._ fileManager.CLASSPATH += File.pathSeparator + PathSettings.scalaCheck fileManager.CLASSPATH += File.pathSeparator + PathSettings.diffUtils // needed to put diffutils on test/partest's classpath @@ -878,7 +870,7 @@ class RunnerManager(kind: String, fileManager: FileManager, params: TestRunParam if (fileManager.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) |