[K/N][runtime][interop] Refactoring to run cinterop in daemon
This commit is contained in:
+16
@@ -5,13 +5,29 @@
|
||||
|
||||
package org.jetbrains.kotlin.native.interop.indexer
|
||||
|
||||
import kotlinx.cinterop.JvmCInteropCallbacks
|
||||
import org.jetbrains.kotlin.konan.util.NativeMemoryAllocator
|
||||
import java.io.File
|
||||
import kotlin.test.AfterTest
|
||||
import kotlin.test.BeforeTest
|
||||
|
||||
open class IndexerTests {
|
||||
init {
|
||||
System.load(System.getProperty("kotlin.native.llvm.libclang"))
|
||||
}
|
||||
|
||||
@BeforeTest
|
||||
fun init() {
|
||||
NativeMemoryAllocator.init()
|
||||
JvmCInteropCallbacks.init()
|
||||
}
|
||||
|
||||
@AfterTest
|
||||
fun dispose() {
|
||||
JvmCInteropCallbacks.dispose()
|
||||
NativeMemoryAllocator.dispose()
|
||||
}
|
||||
|
||||
class TempFiles(name: String) {
|
||||
private val tempRootDir = System.getProperty("kotlin.native.interop.indexer.temp") ?: System.getProperty("java.io.tmpdir") ?: "."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user