From f3a7db24289bdef42494a65e4395a6c345678734 Mon Sep 17 00:00:00 2001 From: Ivan Cilcic Date: Wed, 31 Jul 2019 14:20:32 +0300 Subject: [PATCH] Add auto test in gradle (light tree) Additionally removed benchmarks from auto test because they require manual setting. Instruction was also added. --- build.gradle.kts | 1 + compiler/fir/lightTree/build.gradle.kts | 1 + .../kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index c6173b7aaae..42741a2bbdd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -503,6 +503,7 @@ tasks { dependsOn(":compiler:fir:psi2fir:test") dependsOn(":compiler:fir:resolve:test") dependsOn(":compiler:fir:fir2ir:test") + dependsOn(":compiler:fir:lightTree:test") } create("scriptingTest") { diff --git a/compiler/fir/lightTree/build.gradle.kts b/compiler/fir/lightTree/build.gradle.kts index e96bfe73d42..60aad6e9a99 100644 --- a/compiler/fir/lightTree/build.gradle.kts +++ b/compiler/fir/lightTree/build.gradle.kts @@ -37,6 +37,7 @@ sourceSets { projectTest { workingDir = rootDir + exclude("**/benchmark/**") } val compactClasspath by tasks.creating(Jar::class) { diff --git a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt b/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt index d0c0652209b..aea947986e7 100644 --- a/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt +++ b/compiler/fir/lightTree/tests/org/jetbrains/kotlin/fir/lightTree/benchmark/AbstractBenchmark.kt @@ -14,6 +14,13 @@ import org.openjdk.jmh.annotations.* import java.io.File import java.util.concurrent.TimeUnit +/** + * This class is base for all benchmarks. + * + * To run benchmarks use gradle and consistently run next tasks: + * 1. jmhBytecode + * 2. jmhExec + */ @BenchmarkMode(Mode.SingleShotTime) @Warmup(iterations = 10, batchSize = 1) @Measurement(iterations = 10, batchSize = 1)