aboutsummaryrefslogtreecommitdiff
path: root/integration-tests
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests')
-rw-r--r--integration-tests/build.gradle.kts2
-rw-r--r--integration-tests/gradle/src/integrationTest/kotlin/org/jetbrains/dokka/it/gradle/Android0GradleIntegrationTest.kt17
-rw-r--r--integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt2
3 files changed, 18 insertions, 3 deletions
diff --git a/integration-tests/build.gradle.kts b/integration-tests/build.gradle.kts
index 7f3eee42..a3173af0 100644
--- a/integration-tests/build.gradle.kts
+++ b/integration-tests/build.gradle.kts
@@ -3,7 +3,7 @@ plugins {
}
dependencies {
- api(projects.testUtils)
+ implementation(kotlin("test-junit"))
implementation(libs.kotlinx.coroutines.core)
implementation(libs.jsoup)
implementation(libs.eclipse.jgit)
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 8874bc58..95eaf596 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
@@ -1,10 +1,11 @@
package org.jetbrains.dokka.it.gradle
import org.gradle.testkit.runner.TaskOutcome
-import org.jetbrains.dokka.test.assumeAndroidSdkInstalled
+import org.junit.*
import org.junit.runners.Parameterized.Parameters
import java.io.File
import kotlin.test.*
+import kotlin.test.Test
class Android0GradleIntegrationTest(override val versions: BuildVersions) : AbstractGradleIntegrationTest() {
@@ -12,6 +13,20 @@ class Android0GradleIntegrationTest(override val versions: BuildVersions) : Abst
@get:JvmStatic
@get:Parameters(name = "{0}")
val versions = TestedVersions.ANDROID
+
+ /**
+ * Indicating whether or not the current machine executing the test is a CI
+ */
+ private val isCI: Boolean get() = System.getenv("CI") == "true"
+
+ private val isAndroidSdkInstalled: Boolean = System.getenv("ANDROID_SDK_ROOT") != null ||
+ System.getenv("ANDROID_HOME") != null
+
+ fun assumeAndroidSdkInstalled() {
+ if (isCI) return
+ Assume.assumeTrue(isAndroidSdkInstalled)
+ }
+
}
@BeforeTest
diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt
index 312ff21f..9c549ae2 100644
--- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt
+++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt
@@ -34,7 +34,7 @@ fun AbstractIntegrationTest.applyGitDiffFromFile(diffFile: File) {
private fun removeGitFile(repository: Path) =
repository.toFile()
.listFiles().orEmpty()
- .filter { it.name.toLowerCase() == ".git" }
+ .filter { it.name.lowercase() == ".git" }
.forEach { it.delete() }