Skip to content

Commit e6003d6

Browse files
committed
When a test fails report number of _failures_ not _errors_
Right now we report the number of "errors", that is compiler errors including the expected ones, but we should instead use the test "failures", that is the unexpected behaviors. Also make errorCount private.
1 parent df78c3c commit e6003d6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
227227
val sourceCount = filteredSources.length
228228

229229
private[this] var _errorCount = 0
230-
def errorCount: Int = _errorCount
230+
/** Number of (expected or unexpected) compiler errors. Unlikely to be what you want, use `failureCount` instead. */
231+
private[this] def errorCount: Int = _errorCount
231232

232233
private[this] var _testSourcesCompleted = 0
233234
private def testSourcesCompleted: Int = _testSourcesCompleted
@@ -1013,8 +1014,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
10131014
/** Extract `Failure` set and render from `Test` */
10141015
private[this] def reasonsForFailure(test: Test): String = {
10151016
val errors =
1016-
if (test.errorCount == 0) ""
1017-
else s"\n - encountered ${test.errorCount} error(s)"
1017+
if (test.failureCount == 0) ""
1018+
else s"\n - encountered ${test.failureCount} error(s)"
10181019

10191020
errors + test.failureReasons.collect {
10201021
case test.TimeoutFailure(title) =>

0 commit comments

Comments
 (0)