Skip to content

Commit eaa8d54

Browse files
committed
[no-master] Disable slow scalaTestSuite tests when running in Rhino.
Because under Rhino, they are *too* slow.
1 parent 96cefda commit eaa8d54

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

project/Build.scala

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,6 +2189,39 @@ object Build {
21892189
scalaScalaJUnitSources.collect {
21902190
case fTup if whitelist(fTup._1) => fTup._2
21912191
}
2192+
},
2193+
2194+
/* Disable slow tests when running with Rhino, because they become *too*
2195+
* slow with Rhino.
2196+
*
2197+
* The following tests are targeted:
2198+
*
2199+
* - immutable.RangeConsistencyTest.rangeChurnTest
2200+
* - immutable.SetTest.t7326
2201+
* - immutable.TreeSeqMapTest.testAppend
2202+
* - mutable.ArrayDequeTest.apply
2203+
* - mutable.ArrayDequeTest.sliding
2204+
* - mutable.QueueTest.sliding
2205+
* - mutable.StackTest.sliding
2206+
*
2207+
* Unfortunately we cannot disable test by test, so we have to disable
2208+
* the whole class instead.
2209+
*/
2210+
testOptions in Test := {
2211+
val prev = (testOptions in Test).value
2212+
val isRhino = (resolvedJSEnv in Test).value.isInstanceOf[RhinoJSEnv]
2213+
if (isRhino) {
2214+
prev :+ Tests.Filter { name =>
2215+
!name.endsWith(".immutable.RangeConsistencyTest") &&
2216+
!name.endsWith(".immutable.SetTest") &&
2217+
!name.endsWith(".immutable.TreeSeqMapTest") &&
2218+
!name.endsWith(".mutable.ArrayDequeTest") &&
2219+
!name.endsWith(".mutable.QueueTest") &&
2220+
!name.endsWith(".mutable.StackTest")
2221+
}
2222+
} else {
2223+
prev
2224+
}
21922225
}
21932226
)
21942227
).withScalaJSCompiler.withScalaJSJUnitPlugin.dependsOn(jUnitRuntime, testBridge % "test")

0 commit comments

Comments
 (0)