Build: Use fake ideaHome for tests with intellij build number only

#KTI-82
This commit is contained in:
Vyacheslav Gerasimov
2021-12-02 03:31:00 +03:00
committed by teamcity
parent 516e54a434
commit 944c7990a1
10 changed files with 32 additions and 14 deletions
+5 -2
View File
@@ -74,14 +74,17 @@ tasks.matching { it is Zip && it.name == "mainBenchmarkJar" }.configureEach {
val benchmarkTasks = listOf("mainBenchmark", "mainFirBenchmark", "mainNiBenchmark")
tasks.matching { it is JavaExec && it.name in benchmarkTasks }.configureEach {
this as JavaExec
systemProperty("idea.home.path", intellijRootDir().canonicalPath)
dependsOn(":createIdeaHomeForTests")
systemProperty("idea.home.path", ideaHomePathForTests().canonicalPath)
}
tasks.register<JavaExec>("runBenchmark") {
dependsOn(":createIdeaHomeForTests")
// jmhArgs example: -PjmhArgs='CommonCalls -p size=500 -p isIR=true -p useNI=true -f 1'
val jmhArgs = if (project.hasProperty("jmhArgs")) project.property("jmhArgs").toString() else ""
val resultFilePath = "$buildDir/benchmarks/jmh-result.json"
val ideaHome = intellijRootDir().canonicalPath
val ideaHome = ideaHomePathForTests().canonicalPath
val benchmarkJarPath = "$buildDir/benchmarks/main/jars/benchmarks.jar"
args = mutableListOf("-Didea.home.path=$ideaHome", benchmarkJarPath, "-rf", "json", "-rff", resultFilePath) + jmhArgs.split("\\s".toRegex())