mirror of
https://github.com/sbt/sbt.git
synced 2026-09-07 02:55:23 +02:00
Fix #3746: Scripted should fail when no tests match the pattern
This commit is contained in:
@@ -589,6 +589,10 @@ class ScriptedRunner {
|
||||
val groupCount = if (parallelExecution) instances else Int.MaxValue
|
||||
val scriptedRunners =
|
||||
runner.batchScriptedRunner(scriptedTests, addTestFile, groupCount, prop, logger)
|
||||
// Fail if user provided test patterns but none matched any existing test directories
|
||||
if (tests.nonEmpty && scriptedRunners.isEmpty) {
|
||||
sys.error(s"No tests found matching: ${tests.mkString(", ")}")
|
||||
}
|
||||
if (parallelExecution && instances > 1) {
|
||||
import scala.collection.parallel.CollectionConverters.*
|
||||
val parallelRunners = scriptedRunners.toArray.par
|
||||
|
||||
Reference in New Issue
Block a user