Build: Introduce kotlin.build.test.process.NativeMemoryTracking property

Used to set `-XX:NativeMemoryTracking` for test processes

 #KTI-1609
This commit is contained in:
Vyacheslav Gerasimov
2024-03-14 23:58:22 +01:00
committed by Space Team
parent cf2135aaa4
commit 4f4f6393f9
@@ -212,6 +212,11 @@ fun Project.projectTest(
"-Djna.nosys=true"
)
val nativeMemoryTracking = project.providers.gradleProperty("kotlin.build.test.process.NativeMemoryTracking")
if (nativeMemoryTracking.isPresent) {
jvmArgs("-XX:NativeMemoryTracking=${nativeMemoryTracking.get()}")
}
val junit5ParallelTestWorkers =
project.kotlinBuildProperties.junit5NumberOfThreadsForParallelExecution ?: Runtime.getRuntime().availableProcessors()