From df78c3c4216272c02f53d9f0f422f9492a3e8710 Mon Sep 17 00:00:00 2001 From: Allan Renucci Date: Wed, 25 Apr 2018 15:09:39 +0200 Subject: [PATCH] Fix test reporting When running the tests, we were reporting the number of errors encountered instead of the number of failed tests. For neg tests, errors are not test failures --- compiler/test/dotty/tools/vulpix/ParallelTesting.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala index 945d5fa3efb4..e84724f83c39 100644 --- a/compiler/test/dotty/tools/vulpix/ParallelTesting.scala +++ b/compiler/test/dotty/tools/vulpix/ParallelTesting.scala @@ -253,6 +253,9 @@ trait ParallelTesting extends RunnerOrchestration { self => /** A set of the different failures */ def failureReasons: Set[Failure] = _failures + /** Number of failed tests */ + def failureCount: Int = _failures.size + protected def logBuildInstructions(reporter: TestReporter, testSource: TestSource, err: Int, war: Int) = { val errorMsg = testSource.buildInstructions(reporter.errorCount, reporter.warningCount) addFailureInstruction(errorMsg) @@ -295,7 +298,7 @@ trait ParallelTesting extends RunnerOrchestration { self => "[" + ("=" * (math.max(progress - 1, 0))) + (if (progress > 0) ">" else "") + (" " * (39 - progress)) + - s"] completed ($tCompiled/$sourceCount, $errorCount failed, ${timestamp}s)\r" + s"] completed ($tCompiled/$sourceCount, $failureCount failed, ${timestamp}s)\r" ) Thread.sleep(100) @@ -305,7 +308,7 @@ trait ParallelTesting extends RunnerOrchestration { self => val timestamp = (System.currentTimeMillis - start) / 1000 // println, otherwise no newline and cursor at start of line realStdout.println( - s"[=======================================] completed ($sourceCount/$sourceCount, $errorCount failed, ${timestamp}s)" + s"[=======================================] completed ($sourceCount/$sourceCount, $failureCount failed, ${timestamp}s)" ) }