Depending on the JDK used, in kmm either `iosX64Te...
# gradle
m
Depending on the JDK used, in kmm either
iosX64Test
or
iosSimulatorArm64Test
works and the other is
SKIPPED
. Can I check if the currently used JDK is
arm64
or
x64
compatible in gradle script to run the right test task?
e
just try to run all the tests. the ones that can't run on the current platform are automatically disabled
m
it's true, but they both have to compile and that takes a lot of time. wanted to automate that (also this behavior is far from obvious so a new gradle task would be more discoverable than a comment in project's readme)
e
you could probably do something like
Copy code
tasks.register("allEnabledNativeTests") {
    dependsOn(tasks.withType<KotlinNativeTest>().matching { it.enabled })
}
m
oh, so there's
enabled
flag. looks sweet, I'll try that, thank you!
It works beautifully in selecting the right test task and running it, thank you very much! The only thing that lacks is test output - it doesn't pass through any info about the test result and ide doesn't recognize it.
for local development, I'd just locally patch the build scripts to avoid registering the targets you don't want rather than try to replicate and maintain that
m
Yeah, I thought it's maybe a matter of intercepting whatever the original task outputs and passing it through to the output of my custom task. Apparently not that easy
this custom task will be used by the CI as an additional check to the jvm test suite which is a superset, so I think I have more than enough here 🙂