This is perhaps a silly question, but how do I run...
# kotlin-native
k
This is perhaps a silly question, but how do I run just
linuxArm64Test
? The task doesn't exist for me as shown below.
Copy code
Verification tasks
------------------
allTests - Runs the tests for all targets and create aggregated report
check - Runs all checks.
checkKotlinGradlePluginConfigurationErrors - Checks that Kotlin Gradle Plugin hasn't reported project configuration errors, failing otherwise. This task always runs before compileKotlin* or similar tasks.
iosSimulatorArm64Test - Executes Kotlin/Native unit tests for target iosSimulatorArm64.
iosX64Test - Executes Kotlin/Native unit tests for target iosX64.
jsNodeTest - Run all js tests inside nodejs using the builtin test framework
jsTest - Run JS tests for all platforms
jvmTest - Runs the tests of the test test run.
linuxX64Test - Executes Kotlin/Native unit tests for target linuxX64.
macosArm64Test - Executes Kotlin/Native unit tests for target macosArm64.
macosX64Test - Executes Kotlin/Native unit tests for target macosX64.
mingwX64Test - Executes Kotlin/Native unit tests for target mingwX64.
tvosSimulatorArm64Test - Executes Kotlin/Native unit tests for target tvosSimulatorArm64.
tvosX64Test - Executes Kotlin/Native unit tests for target tvosX64.
wasmJsNodeTest - Run all wasmJs tests inside nodejs using the builtin test framework
wasmJsTest - Run JS tests for all platforms
wasmWasiNodeTest - Run all wasmWasi tests inside nodejs using the builtin test framework
wasmWasiTest - Run JS tests for all platforms
watchosSimulatorArm64Test - Executes Kotlin/Native unit tests for target watchosSimulatorArm64.
watchosX64Test - Executes Kotlin/Native unit tests for target watchosX64.
1
c
Ahah I got bit by this too… you can't, see https://kotlinlang.org/docs/native-target-support.html#tier-2
k
Hmmmm, I thought that meant that Kotlin's test suite was run against the target, not that the tests could be run at all? 🤔
mingwX64 is tier 3 but tests can be run 😅
Ah, here's the bit:
Running tests indicates out of the box support for running tests in Gradle and IDE.
This is only available on a native host for the specific target. For example, you can run
macosX64
and
iosX64
tests only on macOS x86-64 host.
Wish the table header would be named something like Can Run Tests
s
Just to double check, have you added
linuxArm64()
target?
k
Yes.
The above documentation states that certain targets can't run tests out of the box. linuxArm64Test is one of them. It's a bit ambiguous and the documentation could definitely be improved, though.
e
if you're on that platform, you should be able to
./gradlew linuxArm64TestBinaries
and
build/bin/linuxArm64/debugTest/test.kexe
directly even without test support within KGP
k
Oh interesting