diff --git a/native/native.tests/build.gradle.kts b/native/native.tests/build.gradle.kts index af7da129a70..63b3416ac2f 100644 --- a/native/native.tests/build.gradle.kts +++ b/native/native.tests/build.gradle.kts @@ -81,10 +81,11 @@ fun blackBoxTest(taskName: String, vararg tags: String) = projectTest(taskName, // additional stack frames more compared to the old one because of another launcher, etc. and it turns out this is not enough. jvmArgs("-Xss2m") + val availableCpuCores: Int = Runtime.getRuntime().availableProcessors() if (!kotlinBuildProperties.isTeamcityBuild - && minOf(kotlinBuildProperties.junit5NumberOfThreadsForParallelExecution ?: 16, Runtime.getRuntime().availableProcessors()) > 4 + && minOf(kotlinBuildProperties.junit5NumberOfThreadsForParallelExecution ?: 16, availableCpuCores) > 4 ) { - logger.info("JVM C2 compiler has been disabled for task $path") + logger.info("$path JIT C2 compiler has been disabled") jvmArgs("-XX:TieredStopAtLevel=1") // Disable C2 if there are more than 4 CPUs at the host machine. } @@ -106,6 +107,16 @@ fun blackBoxTest(taskName: String, vararg tags: String) = projectTest(taskName, useJUnitPlatform { includeTags(*tags) } + + logger.info( + buildString { + appendLine("$path parallel test execution parameters:") + append(" Available CPU cores = $availableCpuCores") + systemProperties.filterKeys { it.startsWith("junit.jupiter") }.toSortedMap().forEach { (key, value) -> + append("\n $key = $value") + } + } + ) } else doFirst { throw GradleException(