Skip to content

Commit e5f97fc

Browse files
Relative paths forced in getMessingExpectedErrors
1 parent e97456d commit e5f97fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,6 @@ trait ParallelTesting extends RunnerOrchestration { self =>
423423
}
424424

425425
protected def compile(files0: Array[JFile], flags0: TestFlags, suppressErrors: Boolean, targetDir: JFile): TestReporter = {
426-
427426
val flags = flags0.and("-d", targetDir.getPath)
428427
.withClasspath(targetDir.getPath)
429428

@@ -686,7 +685,9 @@ trait ParallelTesting extends RunnerOrchestration { self =>
686685

687686
def getMissingExpectedErrors(errorMap: HashMap[String, Integer], reporterErrors: Iterator[MessageContainer]) = !reporterErrors.forall { error =>
688687
val key = if (error.pos.exists) {
689-
val fileName = error.pos.source.file.toString
688+
def toRelative(path: String): String = // For some reason, absolute paths leak from the compiler itself...
689+
path.split("/").dropWhile(_ != "tests").mkString("/")
690+
val fileName = toRelative(error.pos.source.file.toString)
690691
s"$fileName:${error.pos.line}"
691692

692693
} else "nopos"

0 commit comments

Comments
 (0)