diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-03-31 11:49:43 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-03-31 11:55:16 +0200 |
commit | 57a11776480ab5259281dd29777c45af9ea3ca78 (patch) | |
tree | af84e7eca37779ef164964840bc6a6e8e9313356 /compiler/test/dotty/tools/dotc/reporting/TestReporter.scala | |
parent | 6d7c23016ec866de0b29e9bdde00b60c99df90c2 (diff) | |
download | dotty-57a11776480ab5259281dd29777c45af9ea3ca78.tar.gz dotty-57a11776480ab5259281dd29777c45af9ea3ca78.tar.bz2 dotty-57a11776480ab5259281dd29777c45af9ea3ca78.zip |
Improve summary report by dumping all to stdout on CI
Diffstat (limited to 'compiler/test/dotty/tools/dotc/reporting/TestReporter.scala')
-rw-r--r-- | compiler/test/dotty/tools/dotc/reporting/TestReporter.scala | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/test/dotty/tools/dotc/reporting/TestReporter.scala b/compiler/test/dotty/tools/dotc/reporting/TestReporter.scala index 521cf9576..2d7e6c70a 100644 --- a/compiler/test/dotty/tools/dotc/reporting/TestReporter.scala +++ b/compiler/test/dotty/tools/dotc/reporting/TestReporter.scala @@ -25,10 +25,16 @@ extends Reporter with UniqueMessagePositions with HideNonSensicalMessages with M protected final val _messageBuf = mutable.ArrayBuffer.empty[String] final def flushToFile(): Unit = - _messageBuf.iterator.foreach(filePrintln) + _messageBuf + .iterator + .map(_.replaceAll("\u001b\\[.*?m", "")) + .foreach(filePrintln) final def flushToStdErr(): Unit = - _messageBuf.iterator.foreach(System.err.println) + _messageBuf + .iterator + .map(_.replaceAll("\u001b\\[.*?m", "")) + .foreach(System.err.println) final def inlineInfo(pos: SourcePosition): String = if (pos.exists) { @@ -75,10 +81,11 @@ extends Reporter with UniqueMessagePositions with HideNonSensicalMessages with M } object TestReporter { - private[this] val logWriter = { + private[this] lazy val logWriter = { val df = new SimpleDateFormat("yyyy-MM-dd-HH:mm") val timestamp = df.format(new Date) - new PrintWriter(new FileOutputStream(new JFile(s"../tests-$timestamp.log"), true)) + new JFile("../testlogs").mkdirs() + new PrintWriter(new FileOutputStream(new JFile(s"../testlogs/tests-$timestamp.log"), true)) } def writeToLog(str: String) = { |