From 02ebe0f9b18b7dec024b79109ecf984d23c15cd1 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Wed, 29 Mar 2017 13:29:28 +0200 Subject: Make summary report come at the end of test suite --- .../test/dotty/tools/dotc/ParallelTesting.scala | 24 ++++++---------------- 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'compiler/test/dotty/tools/dotc/ParallelTesting.scala') diff --git a/compiler/test/dotty/tools/dotc/ParallelTesting.scala b/compiler/test/dotty/tools/dotc/ParallelTesting.scala index 016e8770f..30679de9e 100644 --- a/compiler/test/dotty/tools/dotc/ParallelTesting.scala +++ b/compiler/test/dotty/tools/dotc/ParallelTesting.scala @@ -31,6 +31,7 @@ import dotc.util.DiffUtil trait ParallelTesting { import ParallelTesting._ + import ParallelSummaryReport._ /** If the running environment supports an interactive terminal, each `Test` * will be run with a progress bar and real time feedback @@ -197,11 +198,8 @@ trait ParallelTesting { val errorMsg = testSource.buildInstructions(reporter.errorCount, reporter.warningCount) addFailureInstruction(errorMsg) failTestSource(testSource) - reporter.echo(errorMsg) - reporter.flushToFile() } - /** Instructions on how to reproduce failed test source compilations */ private[this] val reproduceInstructions = mutable.ArrayBuffer.empty[String] protected final def addFailureInstruction(ins: String): Unit = @@ -210,7 +208,7 @@ trait ParallelTesting { /** The test sources that failed according to the implementing subclass */ private[this] val failedTestSources = mutable.ArrayBuffer.empty[String] protected final def failTestSource(testSource: TestSource) = synchronized { - failedTestSources.append(testSource.name) + failedTestSources.append(testSource.name + " failed") fail() } @@ -345,21 +343,11 @@ trait ParallelTesting { throw new TimeoutException("Compiling targets timed out") if (didFail) { - echo { - """| - | - | - |================================================================================ - |Test Report - |================================================================================ - |Failing tests:""".stripMargin - } - failedTestSources.toSet.foreach { source: String => - echo(" " + source) - } - echo("") - reproduceInstructions.iterator.foreach(echo) + reportFailed() + failedTestSources.toSet.foreach(addFailedTest) + reproduceInstructions.iterator.foreach(addReproduceInstruction) } + else reportPassed() } else echo { testFilter -- cgit v1.2.3