I need to run tests with cli (I'm using CI system)...
# kotlin-native
g
I need to run tests with cli (I'm using CI system), how can I do that?
o
see https://github.com/JetBrains/kotlin-native/blob/master/backend.native/tests/runtime/workers/worker0.kt for example, just add
@Test
annotation and compile with -tr (test runner), it will produce you an executable you can run, i.e.
Copy code
bin/konanc -tr ./backend.native/tests/runtime/workers/worker0.kt -o worker0
>./worker0.kexe 
[==========] Running 1 tests from 1 test cases.
[----------] Global test environment set-up.
[----------] 1 tests from runtime.workers.worker0.Worker0Kt
[ RUN      ] runtime.workers.worker0.Worker0Kt.runTest
Got Input processed
OK
[       OK ] runtime.workers.worker0.Worker0Kt.runTest (0 ms)
[----------] 1 tests from runtime.workers.worker0.Worker0Kt (0 ms total)

[----------] Global test environment tear-down
[==========] 1 tests from 1 test cases ran. (0 ms total)
[  PASSED  ] 1 tests.
g
thanks @olonho