mirror of https://github.com/sbt/sbt.git
Handle empty case in `labelsAndDirs`
This commit is contained in:
parent
5e44ec7c53
commit
3d6e0f9327
|
|
@ -96,14 +96,15 @@ final class ScriptedTests(resourceBaseDirectory: File,
|
|||
(groupName, testName) -> testDirectory
|
||||
}
|
||||
|
||||
val batchSeed = labelsAndDirs.size / sbtInstances
|
||||
val batchSize = if (batchSeed == 0) labelsAndDirs.size else batchSeed
|
||||
labelsAndDirs
|
||||
.grouped(batchSize)
|
||||
.map { batch => () =>
|
||||
IO.withTemporaryDirectory(runBatchedTests(batch, _, prescripted, log))
|
||||
}
|
||||
.toList
|
||||
if (labelsAndDirs.isEmpty) List()
|
||||
else {
|
||||
val batchSeed = labelsAndDirs.size / sbtInstances
|
||||
val batchSize = if (batchSeed == 0) labelsAndDirs.size else batchSeed
|
||||
labelsAndDirs
|
||||
.grouped(batchSize)
|
||||
.map(batch => () => IO.withTemporaryDirectory(runBatchedTests(batch, _, prescripted, log)))
|
||||
.toList
|
||||
}
|
||||
}
|
||||
|
||||
/** Defines an auto plugin that is injected to sbt between every scripted session.
|
||||
|
|
|
|||
Loading…
Reference in New Issue