Skip to content

Commit ebd8939

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 6084a02 commit ebd8939

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
@@ -35,6 +35,7 @@ buildscript {
3535
}
3636
// These three flags are enabled in train builds for JVM IR compiler testing
3737
ext.jvm_ir_enabled = rootProject.properties['enable_jvm_ir'] != null
38+
ext.jvm_ir_api_check_enabled = rootProject.properties['enable_jvm_ir_api_check'] != null
3839
ext.native_targets_enabled = rootProject.properties['disable_native_targets'] == null
3940

4041
// Determine if any project dependency is using a snapshot version
@@ -326,3 +327,12 @@ knit {
326327
}
327328

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

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)