From 95732a3576feb477fda74d11907878b808c9bc66 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Wed, 5 Apr 2017 19:23:27 +0200 Subject: Improve test failure output --- compiler/test/dotty/tools/vulpix/ParallelTesting.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index d23ab0778..82847e041 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -235,7 +235,7 @@ trait ParallelTesting extends RunnerOrchestration { self => private[this] val failedTestSources = mutable.ArrayBuffer.empty[String] protected final def failTestSource(testSource: TestSource, reason: Option[String] = None) = synchronized { val extra = reason.map(" with reason: " + _).getOrElse("") - failedTestSources.append(testSource.name + " failed" + extra) + failedTestSources.append(testSource.title + s" failed (in ${testSource.name})" + extra) fail() } @@ -516,11 +516,15 @@ trait ParallelTesting extends RunnerOrchestration { self => else if (errorCount == 0) runMain(testSource.classPath) match { case Success(_) => // success! case Failure(output) => + echo(s" failed when running '${testSource.title}'") + echo(output) failTestSource(testSource) case Timeout => + echo(" failed because test " + testSource.title + " timed out") failTestSource(testSource, Some("test timed out")) } else if (errorCount > 0) { + echo(s"\n Compilation failed for: '$testSource'") val buildInstr = testSource.buildInstructions(errorCount, warningCount) addFailureInstruction(buildInstr) failTestSource(testSource) -- cgit v1.2.3