Fix #3746: Scripted should fail when no tests match the pattern

This commit is contained in:
gayanMatch
2026-01-09 13:57:58 -06:00
parent 061145e67b
commit 65af6c59d6
3 changed files with 8 additions and 1 deletions
@@ -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