Skip to content

Commit c149484

Browse files
authored
Make integration tests debuggable (#3401)
1 parent 280a160 commit c149484

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

build-logic/src/main/kotlin/dokkabuild.test-integration.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ val integrationTest by tasks.registering(NonCacheableIntegrationTest::class) {
6666
?: System.getenv("DOKKA_INTEGRATION_TEST_IS_EXHAUSTIVE")?.toBoolean()
6767
?: false.toString()
6868
)
69-
69+
7070
testLogging {
7171
exceptionFormat = TestExceptionFormat.FULL
7272
events(TestLogEvent.SKIPPED, TestLogEvent.FAILED)

dokka-integration-tests/gradle/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ build.gradle.kts file -> "import gradle project".
66
Before importing: Make sure that you have dokka installed
77
locally (`./gradlew publishToMavenLocal`).
88

9+
To debug Gradle tests, the environment variable `ENABLE_DEBUG=true` should be declared.
10+
911
### To update git submodules
1012

1113
Integration tests have fixed git revision number, with the diff patch applied from the corresponding file (e.g. [`coroutines.diff`](projects/coroutines/coroutines.diff)).

dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/AbstractGradleIntegrationTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public abstract class AbstractGradleIntegrationTest : AbstractIntegrationTest()
3434
.forwardOutput()
3535
.withJetBrainsCachedGradleVersion(buildVersions.gradleVersion)
3636
.withTestKitDir(File("build", "gradle-test-kit").absoluteFile)
37+
.withDebug(TestEnvironment.isEnabledDebug)
3738
.withArguments(
3839
listOfNotNull(
3940
"-Pdokka_it_dokka_version=${System.getenv("DOKKA_VERSION")}",

dokka-integration-tests/gradle/src/main/kotlin/org/jetbrains/dokka/it/gradle/TestEnvironment.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public object TestEnvironment {
1313
"Missing `isExhaustive` environment variable"
1414
}.toBoolean()
1515

16+
public val isEnabledDebug: Boolean = System.getenv("ENABLE_DEBUG").toBoolean()
17+
1618
/**
1719
* By default, it is disabled
1820
*/

0 commit comments

Comments
 (0)