Skip to content

Commit 8efd342

Browse files
committed
Exclude failed tests on JVM IR; Add build parameter to enable JVM IR api check
Build with -Penable_jvm_ir_api_check enables JVM IR API check (works only if enable_jvm_ir is set)
1 parent 55e4136 commit 8efd342

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ buildscript {
3434
}
3535
}
3636
ext.jvm_ir_enabled = rootProject.properties['enable_jvm_ir'] != null
37+
ext.jvm_ir_api_check_enabled = rootProject.properties['enable_jvm_ir_api_check'] != null
3738
ext.native_targets_enabled = rootProject.properties['disable_native_targets'] == null
3839

3940
// Determine if any project dependency is using a snapshot version
@@ -325,3 +326,12 @@ knit {
325326
}
326327

327328
knitPrepare.dependsOn getTasksByName("dokka", true)
329+
330+
// Disable binary compatibility check for JVM IR compiler output by default
331+
if (jvm_ir_enabled) {
332+
subprojects { project ->
333+
configure(tasks.matching { it.name == "apiCheck" }) {
334+
enabled = enabled && jvm_ir_api_check_enabled
335+
}
336+
}
337+
}

kotlinx-coroutines-core/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,14 @@ jvmTest {
190190
exclude '**/*StressTest.*'
191191
}
192192
systemProperty 'kotlinx.coroutines.scheduler.keep.alive.sec', '100000' // any unpark problem hangs test
193+
194+
// TODO: JVM IR generates different stacktrace so temporary disable stacktrace tests
195+
if (rootProject.ext.jvm_ir_enabled) {
196+
filter {
197+
excludeTest('kotlinx.coroutines.debug.CoroutinesDumpTest', 'testCreationStackTrace')
198+
excludeTestsMatching('kotlinx.coroutines.exceptions.StackTraceRecovery*')
199+
}
200+
}
193201
}
194202

195203
jvmJar {

kotlinx-coroutines-debug/build.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ dependencies {
2828
api "net.java.dev.jna:jna-platform:$jna_version"
2929
}
3030

31+
// TODO: JVM IR generates different stacktrace so temporary disable stacktrace tests
32+
if (rootProject.ext.jvm_ir_enabled) {
33+
tasks.named('test', Test) {
34+
filter {
35+
excludeTest('kotlinx.coroutines.debug.CoroutinesDumpTest', 'testCreationStackTrace')
36+
excludeTestsMatching('kotlinx.coroutines.debug.DebugProbesTest')
37+
}
38+
}
39+
}
40+
3141
jar {
3242
manifest {
3343
attributes "Premain-Class": "kotlinx.coroutines.debug.AgentPremain"

0 commit comments

Comments
 (0)