Build: Rework test workers calculation with respect to available memory

#KTI-787
This commit is contained in:
Vyacheslav Gerasimov
2022-03-21 16:27:16 +03:00
committed by teamcity
parent cae3d8a672
commit d9e8f0c180
9 changed files with 39 additions and 28 deletions
@@ -208,7 +208,9 @@ if (isTeamcityBuild) {
}
val KGP_TEST_TASKS_GROUP = "Kotlin Gradle Plugin Verification"
val maxParallelTestForks = (Runtime.getRuntime().availableProcessors() / 4).coerceAtLeast(1)
val memoryPerGradleTestWorkerMb = 6000
val maxParallelTestForks =
(totalMaxMemoryForTestsMb / memoryPerGradleTestWorkerMb).coerceAtMost(Runtime.getRuntime().availableProcessors())
val allParallelTestsTask = tasks.register<Test>("kgpAllParallelTests") {
group = KGP_TEST_TASKS_GROUP