Skip to content

Commit a4dcff5

Browse files
committed
Add support for skipping database integration tests via Gradle property
1 parent d896797 commit a4dcff5

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ testServerPort=8085
1010

1111
gradleVersion=9.2.0
1212

13-
org.gradle.jvmargs=-Xmx4G
13+
org.gradle.jvmargs=-Xmx4G
14+
15+
skipDbIntegrationTests=false

integrations/database/build.gradle.kts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ plugins {
66
alias(libs.plugins.publisher)
77
}
88

9+
subprojects {
10+
// Allow skipping DB integration tests via -PskipDbIntegrationTests=true
11+
val skipDbIntegrationTests =
12+
providers
13+
.gradleProperty("skipDbIntegrationTests")
14+
.orNull
15+
?.toBoolean() == true
16+
17+
if (skipDbIntegrationTests) {
18+
tasks.withType<Test> {
19+
20+
// DB integration tests are placed under this package
21+
exclude("org/jetbrains/kotlinx/jupyter/database/test/integration/**")
22+
failOnNoDiscoveredTests = false
23+
}
24+
}
25+
}
26+
927
kotlinPublications {
1028
pom {
1129
githubRepo("Kotlin", "kotlin-notebook-libraries")

0 commit comments

Comments
 (0)