[K/N] Test case for KT-51302

There is no infrastructure for testing klib ABI compatibility yet.
As a workaround, we store klib directly in repo.
This commit is contained in:
Sergey Bogolepov
2022-02-15 12:35:25 +03:00
committed by Space
parent 2f46a45bfd
commit a22dcc0f14
13 changed files with 32 additions and 0 deletions
@@ -5222,6 +5222,12 @@ tasks.register("library_ir_provider_mismatch", KonanDriverTest) {
}
}
standaloneTest("kt51302") {
enabled = project.target.name == project.hostName
source = "serialization/KT-51302/main.kt"
flags = ["-l", "$projectDir/serialization/KT-51302/kt51302_dependency"]
}
standaloneTest("fake_override_0") {
def sources = "$projectDir/link/fake_overrides"
def dir = buildDir.absolutePath
@@ -0,0 +1,8 @@
builtins_platform=NATIVE
unique_name=kt51302_dependency
compiler_version=1.6.10
depends=stdlib
abi_version=1.6.0
native_targets=macos_x64
metadata_version=1.4.1
ir_version=1.0.0
@@ -0,0 +1,8 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
fun main() {
val c = C()
}
@@ -0,0 +1,10 @@
At the time of writing, there is no infrastructure for writing klib
compatibility tests. Instead, we store klib directly in repository.
`kt51302_dependency` was generated from `lib.kt`
```kotlin
annotation class C
```
with the following command:
```commandline
~/.konan/kotlin-native-prebuilt-macos-x86_64-1.6.10/bin/konanc -p library lib.kt -nopack -o kt51302_dependency
```