[K/N] Test for KT-50970
This commit is contained in:
@@ -178,6 +178,7 @@ run {
|
|||||||
// Add regular gradle test tasks
|
// Add regular gradle test tasks
|
||||||
dependsOn(tasksOf(Test))
|
dependsOn(tasksOf(Test))
|
||||||
dependsOn(tasksOf(CoverageTest))
|
dependsOn(tasksOf(CoverageTest))
|
||||||
|
dependsOn(tasksOf(FileCheckTest))
|
||||||
dependsOn(":kotlin-native:Interop:Indexer:check")
|
dependsOn(":kotlin-native:Interop:Indexer:check")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,7 +196,10 @@ task sanity {
|
|||||||
// Add regular gradle test tasks
|
// Add regular gradle test tasks
|
||||||
dependsOn(tasksOf(Test))
|
dependsOn(tasksOf(Test))
|
||||||
dependsOn(tasksOf(CoverageTest))
|
dependsOn(tasksOf(CoverageTest))
|
||||||
dependsOn(tasksOf(FileCheckTest))
|
dependsOn(tasksOf(FileCheckTest) { task ->
|
||||||
|
// Avoid cross-compilation in a sanity run.
|
||||||
|
task.targetName == project.target.name
|
||||||
|
})
|
||||||
dependsOn(":kotlin-native:Interop:Indexer:check")
|
dependsOn(":kotlin-native:Interop:Indexer:check")
|
||||||
dependsOn(":kotlin-native:Interop:StubGenerator:check")
|
dependsOn(":kotlin-native:Interop:StubGenerator:check")
|
||||||
}
|
}
|
||||||
@@ -5945,6 +5949,16 @@ fileCheckTest("filecheck_smoke0") {
|
|||||||
annotatedSource = project.file('filecheck/smoke0.kt')
|
annotatedSource = project.file('filecheck/smoke0.kt')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (HostManager.@Companion.hostIsMac) {
|
||||||
|
fileCheckTest("filecheck_force_arm_instruction_set") {
|
||||||
|
annotatedSource = project.file('filecheck/force_arm_instruction_set.kt')
|
||||||
|
targetName = "watchos_arm32"
|
||||||
|
// Perform check after optimization pipeline because
|
||||||
|
// LLVM might infer attributes.
|
||||||
|
phaseToCheck = "BitcodeOptimization"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fileCheckTest("filecheck_replace_invoke_with_call") {
|
fileCheckTest("filecheck_replace_invoke_with_call") {
|
||||||
annotatedSource = project.file('filecheck/replace_invoke_with_call.kt')
|
annotatedSource = project.file('filecheck/replace_invoke_with_call.kt')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// NB: This is not a good test.
|
||||||
|
// What we actually want to check is that Kotlin/Native compiler is able to produce "big"
|
||||||
|
// binaries for 32-bit Apple Watch target. The problem is that such test is very-very-very
|
||||||
|
// slow to compile (~20 min on a local machine) which is not acceptable for CI.
|
||||||
|
//
|
||||||
|
// Instead, here we check that none of the module's functions are compiled in the Thumb mode.
|
||||||
|
// BL instructions in thumb mode have smaller ranges which causes "relocation out of range" failure.
|
||||||
|
|
||||||
|
// CHECK: target triple = "armv7k-apple-watchos{{.+}}"
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
println("hello")
|
||||||
|
}
|
||||||
|
|
||||||
|
// CHECK-NOT: attributes #{{[0-9]+}} = { {{.+}}+thumb-mode{{.+}} }
|
||||||
Reference in New Issue
Block a user