Skip to content

Commit 07718a3

Browse files
committed
Improve test failure output
1 parent 2c28a97 commit 07718a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
234234
private[this] val failedTestSources = mutable.ArrayBuffer.empty[String]
235235
protected final def failTestSource(testSource: TestSource, reason: Option[String] = None) = synchronized {
236236
val extra = reason.map(" with reason: " + _).getOrElse("")
237-
failedTestSources.append(testSource.name + " failed" + extra)
237+
failedTestSources.append(testSource.title + s" failed (in ${testSource.name})" + extra)
238238
fail()
239239
}
240240

@@ -515,11 +515,15 @@ trait ParallelTesting extends RunnerOrchestration { self =>
515515
else if (errorCount == 0) runMain(testSource.classPath) match {
516516
case Success(_) => // success!
517517
case Failure(output) =>
518+
echo(s" failed when running '${testSource.title}'")
519+
echo(output)
518520
failTestSource(testSource)
519521
case Timeout =>
522+
echo(" failed because test " + testSource.title + " timed out")
520523
failTestSource(testSource, Some("test timed out"))
521524
}
522525
else if (errorCount > 0) {
526+
echo(s"\n Compilation failed for: '$testSource'")
523527
val buildInstr = testSource.buildInstructions(errorCount, warningCount)
524528
addFailureInstruction(buildInstr)
525529
failTestSource(testSource)

0 commit comments

Comments
 (0)