Skip to content

Commit df78c3c

Browse files
committed
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
1 parent 8feb596 commit df78c3c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
253253
/** A set of the different failures */
254254
def failureReasons: Set[Failure] = _failures
255255

256+
/** Number of failed tests */
257+
def failureCount: Int = _failures.size
258+
256259
protected def logBuildInstructions(reporter: TestReporter, testSource: TestSource, err: Int, war: Int) = {
257260
val errorMsg = testSource.buildInstructions(reporter.errorCount, reporter.warningCount)
258261
addFailureInstruction(errorMsg)
@@ -295,7 +298,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
295298
"[" + ("=" * (math.max(progress - 1, 0))) +
296299
(if (progress > 0) ">" else "") +
297300
(" " * (39 - progress)) +
298-
s"] completed ($tCompiled/$sourceCount, $errorCount failed, ${timestamp}s)\r"
301+
s"] completed ($tCompiled/$sourceCount, $failureCount failed, ${timestamp}s)\r"
299302
)
300303

301304
Thread.sleep(100)
@@ -305,7 +308,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
305308
val timestamp = (System.currentTimeMillis - start) / 1000
306309
// println, otherwise no newline and cursor at start of line
307310
realStdout.println(
308-
s"[=======================================] completed ($sourceCount/$sourceCount, $errorCount failed, ${timestamp}s)"
311+
s"[=======================================] completed ($sourceCount/$sourceCount, $failureCount failed, ${timestamp}s)"
309312
)
310313
}
311314

0 commit comments

Comments
 (0)