I'm trying to run tests on the iOS simulator. iOS ...
# kotlin-native
m
I'm trying to run tests on the iOS simulator. iOS test code is common test code only. It crashes in
Memory.cpp
and I have no hint what is causing this 😕 Does anybody have an idea?
Found the cause. See comments. Sources: https://github.com/fluidsonic/fluid-time/tree/native-testing Output:
Copy code
$ xcrun simctl spawn "iPhone 8" "/Users/marc/Documents/fluid-time/build/bin/iosX64/testDebugExecutable/test.kexe"
/Users/teamcity/buildAgent/work/4d622a065c544371/runtime/src/main/cpp/Memory.cpp:1216: runtime assert: memory state must be clear
Child process terminated with signal 6: Abort trap
Debugging with
lldb
and
macosX64
target now.
InitMemory
is called twice indeed:
Copy code
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
  * frame #0: 0x00000001000ddef0 test.kexe`InitMemory
    frame #1: 0x00000001000ddd17 test.kexe`(anonymous namespace)::initRuntime() + 55
    frame #2: 0x00000001000dda0a test.kexe`Kotlin_initRuntimeIfNeeded + 26
    frame #3: 0x000000010000f081 test.kexe`main + 17
    frame #4: 0x00007fff777ca3d5 libdyld.dylib`start + 1
    frame #5: 0x00007fff777ca3d5 libdyld.dylib`start + 1

* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
  * frame #0: 0x00000001000ddef0 test.kexe`InitMemory
    frame #1: 0x00000001000ddd17 test.kexe`(anonymous namespace)::initRuntime() + 55
    frame #2: 0x00000001000dda0a test.kexe`Kotlin_initRuntimeIfNeeded + 26
    frame #3: 0x00000001000ea467 test.kexe`-[NSArray(NSArrayToKotlin) toKotlin:] + 23
    frame #4: 0x00000001000c683b test.kexe`kfun:platform.Foundation.objcKniBridge5861$Foundation(kniSC=0x0000000000000000, kniR=0x00007fffa333a040, kniSEL=0x00007fff5fd9a037)kotlin.collections.List<#STAR> at Foundation.kt:66377:12
    frame #5: 0x00000001000c6725 test.kexe at TimeZoneIos.kt:26:21
    frame #6: 0x00000001000ddd54 test.kexe`(anonymous namespace)::initRuntime() + 116
    frame #7: 0x00000001000dda0a test.kexe`Kotlin_initRuntimeIfNeeded + 26
    frame #8: 0x000000010000f081 test.kexe`main + 17
    frame #9: 0x00007fff777ca3d5 libdyld.dylib`start + 1
    frame #10: 0x00007fff777ca3d5 libdyld.dylib`start + 1
j
How to add setup common tests to execute in the xcode project?