aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-04-05 19:23:27 +0200
committerFelix Mulder <felix.mulder@gmail.com>2017-04-12 11:31:13 +0200
commit95732a3576feb477fda74d11907878b808c9bc66 (patch)
treea6ad7d6cafd771bec42bfcf1115a05fec50b616c
parentc1e787f7560807ca95e021d9cb7f1406c5953c3c (diff)
downloaddotty-95732a3576feb477fda74d11907878b808c9bc66.tar.gz
dotty-95732a3576feb477fda74d11907878b808c9bc66.tar.bz2
dotty-95732a3576feb477fda74d11907878b808c9bc66.zip
Improve test failure output
-rw-r--r--compiler/test/dotty/tools/vulpix/ParallelTesting.scala6
1 files changed, 5 insertions, 1 deletions
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)