diff options
4 files changed, 31 insertions, 9 deletions
diff --git a/integration-tests/build.gradle.kts b/integration-tests/build.gradle.kts index 9b7bc435..86472aa9 100644 --- a/integration-tests/build.gradle.kts +++ b/integration-tests/build.gradle.kts @@ -22,15 +22,23 @@ subprojects { maxHeapSize = "2G" description = "Runs integration tests." group = "verification" + useJUnit() + testClassesDirs = sourceSets["integrationTest"].output.classesDirs classpath = sourceSets["integrationTest"].runtimeClasspath + setForkEvery(1) project.properties["dokka_integration_test_parallelism"]?.toString()?.toIntOrNull()?.let { parallelism -> maxParallelForks = parallelism } + environment( + "isExhaustive", + project.properties["dokka_integration_test_is_exhaustive"]?.toString()?.toBoolean() + ?: System.getenv("DOKKA_INTEGRATION_TEST_IS_EXHAUSTIVE")?.toBoolean() + ?: false.toString() + ) - useJUnit() } tasks.check { diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt index f9db9757..d6dfe451 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt @@ -14,16 +14,16 @@ class Android0GradleIntegrationTest(override val versions: BuildVersions) : Abst @get:JvmStatic @get:Parameters(name = "{0}") val versions = BuildVersions.permutations( - gradleVersions = listOf("6.5.1", "5.6.4"), - kotlinVersions = listOf("1.3.72", "1.4.0-rc"), - androidGradlePluginVersions = listOf("3.5.3", "3.6.3") + gradleVersions = listOf("6.5.1", *ifExhaustive("5.6.4")), + kotlinVersions = listOf("1.4.0-rc", *ifExhaustive("1.3.72")), + androidGradlePluginVersions = listOf("3.5.3", *ifExhaustive("3.6.3")) ) + BuildVersions.permutations( - gradleVersions = listOf("6.5.1", "6.1.1"), - kotlinVersions = listOf("1.3.72", "1.4.0-rc"), + gradleVersions = listOf("6.5.1", *ifExhaustive("6.1.1")), + kotlinVersions = listOf("1.4.0-rc", *ifExhaustive("1.3.72")), androidGradlePluginVersions = listOf("4.0.0") ) + BuildVersions.permutations( gradleVersions = listOf("6.5.1"), - kotlinVersions = listOf("1.3.72", "1.4.0-rc"), + kotlinVersions = listOf("1.4.0-rc", *ifExhaustive("1.3.72")), androidGradlePluginVersions = listOf("4.1.0-beta02") ) } diff --git a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt index 5afb77e7..54021e81 100644 --- a/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt +++ b/integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/BasicGradleIntegrationTest.kt @@ -11,8 +11,8 @@ class BasicGradleIntegrationTest(override val versions: BuildVersions) : Abstrac @get:JvmStatic @get:Parameters(name = "{0}") val versions = BuildVersions.permutations( - gradleVersions = listOf("6.5.1", "6.4.1", "6.3", "6.2.2", "6.1.1", "6.0", "5.6.4"), - kotlinVersions = listOf("1.3.30", "1.3.72", "1.4.0-rc") + gradleVersions = listOf("6.5.1", *ifExhaustive("6.4.1", "6.3", "6.2.2", "6.1.1", "6.0"), "5.6.4"), + kotlinVersions = listOf("1.3.30", *ifExhaustive("1.3.72"), "1.4.0-rc") ) } diff --git a/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt new file mode 100644 index 00000000..6e393a6d --- /dev/null +++ b/integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt @@ -0,0 +1,14 @@ +package org.jetbrains.dokka.it.gradle + +object TestEnvironment { + val isExhaustive = checkNotNull(System.getenv("isExhaustive")) { + "Missing `isExhaustive` environment variable" + }.toBoolean() +} + +/** + * Will only return values if [TestEnvironment.isExhaustive] is set to true + */ +inline fun <reified T> ifExhaustive(vararg values: T): Array<out T> { + return if (TestEnvironment.isExhaustive) values else emptyArray() +} |