Skip to content

Commit bfe4803

Browse files
authored
Skip tests using a particular JVM toolchain from code coverage runs (#189)
1 parent 5db925e commit bfe4803

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/functionalTest/kotlin/kotlinx/validation/test/JavaVersionsCompatibilityTest.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ import kotlinx.validation.api.*
99
import kotlinx.validation.api.buildGradleKts
1010
import kotlinx.validation.api.resolve
1111
import kotlinx.validation.api.test
12+
import org.gradle.testkit.runner.GradleRunner
13+
import org.junit.Assume
1214
import org.junit.Test
1315

1416
class JavaVersionsCompatibilityTest : BaseKotlinGradleTest() {
17+
private fun skipInDebug(runner: GradleRunner) {
18+
Assume.assumeFalse(
19+
"The test requires a separate Gradle process as it uses a different JVM version, " +
20+
"so it could not be executed with debug turned on.",
21+
runner.isDebug
22+
)
23+
}
24+
1525
private fun checkCompatibility(useMaxVersion: Boolean) {
1626
val runner = test(gradleVersion = "8.5", injectPluginClasspath = false) {
1727
buildGradleKts {
@@ -33,6 +43,8 @@ class JavaVersionsCompatibilityTest : BaseKotlinGradleTest() {
3343
}
3444
}
3545

46+
skipInDebug(runner)
47+
3648
runner.build().apply {
3749
assertTaskSuccess(":apiCheck")
3850
}
@@ -59,6 +71,8 @@ class JavaVersionsCompatibilityTest : BaseKotlinGradleTest() {
5971
}
6072
}
6173

74+
skipInDebug(runner)
75+
6276
runner.build().apply {
6377
assertTaskSuccess(":apiCheck")
6478
}

0 commit comments

Comments
 (0)