Skip to content

Commit c5d770f

Browse files
committed
Do not report warnings
1 parent c99694f commit c5d770f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
506506

507507
private def parseErrors(errorsText: String, compilerVersion: String, pageWidth: Int) =
508508
val errorPattern = """^.*Error: (.*\.scala):(\d+):(\d+).*""".r
509+
val warnPattern = """^.*Warning: (.*\.scala):(\d+):(\d+).*""".r
509510
val summaryPattern = """\d+ (?:warning|error)s? found""".r
510511
val indent = " "
511512
var diagnostics = List.empty[Diagnostic.Error]
@@ -517,9 +518,13 @@ trait ParallelTesting extends RunnerOrchestration { self =>
517518
case head :: tail =>
518519
diagnostics = Diagnostic.Error(s"${head.msg.rawMessage}$str", head.pos) :: tail
519520
case Nil =>
521+
var inError = false
520522
for line <- errorsText.linesIterator do
521523
line match
524+
case error @ warnPattern(filePath, line, column) =>
525+
inError = false
522526
case error @ errorPattern(filePath, line, column) =>
527+
inError = true
523528
val lineNum = line.toInt
524529
val columnNum = column.toInt
525530
val abstractFile = AbstractFile.getFile(filePath)
@@ -530,7 +535,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
530535
addToLast(barLine(start = false))
531536
diagnostics ::= Diagnostic.Error(s"Compilation of $filePath with Scala $compilerVersion failed at line: $line, column: $column.\nFull error output:\n${barLine(start = true)}${errorLine(error)}", sourcePos)
532537
case summaryPattern() => // Ignored
533-
case line => addToLast(errorLine(line))
538+
case line if inError => addToLast(errorLine(line))
539+
case _ =>
534540
addToLast(barLine(start = false))
535541
diagnostics.reverse
536542

0 commit comments

Comments
 (0)