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
@@ -59,9 +59,6 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
projectTest(jUnitMode = JUnitMode.JUnit5) {
dependsOn(":dist")
workingDir = rootDir
jvmArgs!!.removeIf { it.contains("-Xmx") }
maxHeapSize = "3g"
useJUnitPlatform()
}
@@ -47,11 +47,9 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
}
}
projectTest(parallel = true) {
projectTest(parallel = true, maxHeapSizeMb = 3072) {
dependsOn(":dist")
workingDir = rootDir
jvmArgs!!.removeIf { it.contains("-Xmx") }
maxHeapSize = "3g"
}
testsJar()
@@ -43,12 +43,9 @@ sourceSets {
"test" { projectDefault() }
}
projectTest {
projectTest(minHeapSizeMb = 8192, maxHeapSizeMb = 8192, reservedCodeCacheSizeMb = 512) {
systemProperties(project.properties.filterKeys { it.startsWith("fir.") })
workingDir = rootDir
jvmArgs!!.removeIf { it.contains("-Xmx") || it.contains("-Xms") || it.contains("ReservedCodeCacheSize") }
minHeapSize = "8g"
maxHeapSize = "8g"
dependsOn(":dist")
run {
@@ -58,7 +55,6 @@ projectTest {
jvmArgs(paramRegex.findAll(argsExt).map { it.groupValues[1] }.toList())
}
}
jvmArgs("-XX:ReservedCodeCacheSize=512m")
}
testsJar()
@@ -60,9 +60,6 @@ if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
projectTest(jUnitMode = JUnitMode.JUnit5) {
dependsOn(":dist")
workingDir = rootDir
jvmArgs!!.removeIf { it.contains("-Xmx") }
maxHeapSize = "3g"
useJUnitPlatform()
}