@@ -7,7 +7,7 @@ import com.intellij.execution.testframework.sm.SMCustomMessagesParsing
7
7
import com .intellij .execution .testframework .sm .runner .OutputToGeneralTestEventsConverter
8
8
import com .intellij .util .ReflectionUtil
9
9
import jetbrains .buildServer .messages .serviceMessages ._
10
- import org .jetbrains .plugins .scala .testingSupport .test .{AbstractTestRunConfiguration , ScalaTestFrameworkConsoleProperties }
10
+ import org .jetbrains .plugins .scala .testingSupport .test .{AbstractTestFramework , AbstractTestRunConfiguration , ScalaTestFrameworkConsoleProperties }
11
11
12
12
import java .io .PrintStream
13
13
import scala .util .control .NoStackTrace
@@ -35,17 +35,26 @@ private[zio] class ZTestFrameworkConsoleProperties(configuration: AbstractTestRu
35
35
.get(self)
36
36
.asInstanceOf [ServiceMessageVisitor ]
37
37
38
- private lazy val testVisitor = new ZTestVisitor (underlyingTestVisitor)
38
+ private lazy val testVisitor = new ZTestVisitor (underlyingTestVisitor, configuration.testFramework)
39
+
39
40
40
41
override def processServiceMessage (message : ServiceMessage , visitor : ServiceMessageVisitor ): Unit =
41
42
message.visit(testVisitor)
42
43
43
44
}
44
45
45
- private class ZTestVisitor (underlying : ServiceMessageVisitor ) extends DefaultServiceMessageVisitor {
46
- private val regexFromHell =
46
+ private class ZTestVisitor (underlying : ServiceMessageVisitor , testFramework : AbstractTestFramework ) extends DefaultServiceMessageVisitor {
47
+ private val regexFromHellZio1 =
47
48
raw " \[1m.\[34m([\s\S]*).\[0m.\[0m.*\[31mwas not equal to.*\[1m.\[34m([\s\S]*?).\[0m.\[0m " .r
48
49
50
+ private val regexFromHellZio2 =
51
+ raw " \[1m.\[34m([\s\S]*).\[0m.\[0m.*\[31mwas not equal to.\[0m..\[1m.\[34m([\s\S]*).\[0m.\[0m\s+.\[1m " .r
52
+
53
+ private val regexFromHell = testFramework match {
54
+ case _ : Zio1TestFramework => regexFromHellZio1
55
+ case _ : Zio2TestFramework => regexFromHellZio2
56
+ }
57
+
49
58
override def visitTestFailed (testFailed : TestFailed ): Unit = {
50
59
val details = testFailed.getStacktrace
51
60
val tf = regexFromHell
0 commit comments